builder.io 1.17.16 → 1.17.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/index.cjs +38 -38
- package/cli/index.cjs.map +2 -2
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +3 -3
- package/server/index.mjs +3 -3
- package/types/tsconfig.tsbuildinfo +1 -1
package/cli/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ate=Object.create;var Jh=Object.defineProperty;var _te=Object.getOwnPropertyDescriptor;var Fte=Object.getOwnPropertyNames;var kte=Object.getPrototypeOf,Ite=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yh=(t,e)=>{for(var r in e)Jh(t,r,{get:e[r],enumerable:!0})},QF=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Fte(e))!Ite.call(t,i)&&i!==r&&Jh(t,i,{get:()=>e[i],enumerable:!(n=_te(e,i))||n.enumerable});return t};var J=(t,e,r)=>(r=t!=null?Ate(kte(t)):{},QF(e||!t||!t.__esModule?Jh(r,"default",{value:t,enumerable:!0}):r,t)),Nte=t=>QF(Jh({},"__esModule",{value:!0}),t);var h=N(()=>{{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"
|
|
1
|
+
var Ate=Object.create;var Jh=Object.defineProperty;var _te=Object.getOwnPropertyDescriptor;var Fte=Object.getOwnPropertyNames;var kte=Object.getPrototypeOf,Ite=Object.prototype.hasOwnProperty;var N=(t,e)=>()=>(t&&(e=t(t=0)),e);var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yh=(t,e)=>{for(var r in e)Jh(t,r,{get:e[r],enumerable:!0})},QF=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Fte(e))!Ite.call(t,i)&&i!==r&&Jh(t,i,{get:()=>e[i],enumerable:!(n=_te(e,i))||n.enumerable});return t};var J=(t,e,r)=>(r=t!=null?Ate(kte(t)):{},QF(e||!t||!t.__esModule?Jh(r,"default",{value:t,enumerable:!0}):r,t)),Nte=t=>QF(Jh({},"__esModule",{value:!0}),t);var h=N(()=>{{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"0b2a9af9da3554bf73ee830687da4940e04f3379"}}});var ek=S((gBe,ZF)=>{h();function E0(t){return t==null?[]:Array.isArray(t)?t:[t]}function Rte(t,e,r,n){var i,s=t[e],o=~n.string.indexOf(e)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(e)?r==="false"?!1:r==="true"||(t._.push((i=+r,i*0===0?i:r)),!!r):(i=+r,i*0===0?i:r);t[e]=s==null?o:Array.isArray(s)?s.concat(o):[s,o]}ZF.exports=function(t,e){t=t||[],e=e||{};var r,n,i,s,o,a={_:[]},c=0,u=0,l=0,p=t.length;let d=e.alias!==void 0,m=e.unknown!==void 0,f=e.default!==void 0;if(e.alias=e.alias||{},e.string=E0(e.string),e.boolean=E0(e.boolean),d)for(r in e.alias)for(n=e.alias[r]=E0(e.alias[r]),c=0;c<n.length;c++)(e.alias[n[c]]=n.concat(r)).splice(c,1);for(c=e.boolean.length;c-- >0;)for(n=e.alias[e.boolean[c]]||[],u=n.length;u-- >0;)e.boolean.push(n[u]);for(c=e.string.length;c-- >0;)for(n=e.alias[e.string[c]]||[],u=n.length;u-- >0;)e.string.push(n[u]);if(f){for(r in e.default)if(s=typeof e.default[r],n=e.alias[r]=e.alias[r]||[],e[s]!==void 0)for(e[s].push(r),c=0;c<n.length;c++)e[s].push(n[c])}let g=m?Object.keys(e.alias):[];for(c=0;c<p;c++){if(i=t[c],i==="--"){a._=a._.concat(t.slice(++c));break}for(u=0;u<i.length&&i.charCodeAt(u)===45;u++);if(u===0)a._.push(i);else if(i.substring(u,u+3)==="no-"){if(s=i.substring(u+3),m&&!~g.indexOf(s))return e.unknown(i);a[s]=!1}else{for(l=u+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(u,l),o=i.substring(++l)||c+1===p||(""+t[c+1]).charCodeAt(0)===45||t[++c],n=u===2?[s]:s,l=0;l<n.length;l++){if(s=n[l],m&&!~g.indexOf(s))return e.unknown("-".repeat(u)+s);Rte(a,s,l+1<n.length||o,e)}}}if(f)for(r in e.default)a[r]===void 0&&(a[r]=e.default[r]);if(d)for(r in a)for(n=e.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}});function Ote(t){let e=[],r=vc.default.dirname(t);for(;r!==vc.default.dirname(r);){let n=vc.default.join(r,".prettierignore");w0.default.existsSync(n)&&e.push(n);let i=vc.default.join(r,".git");if(w0.default.existsSync(i))break;r=vc.default.dirname(r)}return e}function Bte(t){if(!t)return C0.default;try{let r=(0,tk.createRequire)(t)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return C0.default}}async function hi(t,e,r,n){try{let i=vc.default.resolve(t,n??"file.tsx"),s=Bte(i);if(n){let a=Ote(i);if((await s.getFileInfo(i,{ignorePath:a.length>0?a:void 0})).ignored)return e}let o=await s.resolveConfig(i);return o?await s.format(e,{...o,filepath:n,parser:r}):await s.format(e,{filepath:n,parser:r})}catch{return e}}var C0,tk,vc,w0,Od=N(()=>{"use strict";h();C0=J(require("prettier"),1),tk=require("node:module"),vc=J(require("node:path"),1),w0=J(require("node:fs"),1)});var S0,ul,Xh,Qh,rk,bc,T0,P0,xc,nk,ll=N(()=>{"use strict";h();S0="preview-url",ul="framework",Xh="platform",Qh="node",rk="/~builder-connect",bc="/~builder-connected",T0="/~builder-dev-tools",P0="/~builder-dev-tools.js",xc="/~builder-dev-tools-close",nk="/mappings"});var Zh=S((EBe,ik)=>{"use strict";h();var A0={to(t,e){return e?`\x1B[${e+1};${t+1}H`:`\x1B[${t+1}G`},move(t,e){let r="";return t<0?r+=`\x1B[${-t}D`:t>0&&(r+=`\x1B[${t}C`),e<0?r+=`\x1B[${-e}A`:e>0&&(r+=`\x1B[${e}B`),r},up:(t=1)=>`\x1B[${t}A`,down:(t=1)=>`\x1B[${t}B`,forward:(t=1)=>`\x1B[${t}C`,backward:(t=1)=>`\x1B[${t}D`,nextLine:(t=1)=>"\x1B[E".repeat(t),prevLine:(t=1)=>"\x1B[F".repeat(t),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Mte={up:(t=1)=>"\x1B[S".repeat(t),down:(t=1)=>"\x1B[T".repeat(t)},Lte={screen:"\x1B[2J",up:(t=1)=>"\x1B[1J".repeat(t),down:(t=1)=>"\x1B[J".repeat(t),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?A0.up():"");return t&&(e+=A0.left),e}};ik.exports={cursor:A0,scroll:Mte,erase:Lte,beep:"\x07"}});var mr=S((wBe,_0)=>{h();var tg=process||{},sk=tg.argv||[],eg=tg.env||{},$te=!(eg.NO_COLOR||sk.includes("--no-color"))&&(!!eg.FORCE_COLOR||sk.includes("--color")||tg.platform==="win32"||(tg.stdout||{}).isTTY&&eg.TERM!=="dumb"||!!eg.CI),jte=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+Ute(i,e,r,s)+e:t+i+e},Ute=(t,e,r,n)=>{let i="",s=0;do i+=t.substring(s,n)+r,s=n+e.length,n=t.indexOf(e,s);while(~n);return i+t.substring(s)},ok=(t=$te)=>{let e=t?jte:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};_0.exports=ok();_0.exports.createColors=ok});function qte({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function yk(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(zte,"")}function vk(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Bd(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=yk(t),t.length===0))return 0;t=t.replace(Kte()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(Vte.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}function Yte(){let t=new Map;for(let[e,r]of Object.entries(sr)){for(let[n,i]of Object.entries(r))sr[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=sr[n],t.set(i[0],i[1]);Object.defineProperty(sr,e,{value:r,enumerable:!1})}return Object.defineProperty(sr,"codes",{value:t,enumerable:!1}),sr.color.close="\x1B[39m",sr.bgColor.close="\x1B[49m",sr.color.ansi=ak(),sr.color.ansi256=ck(),sr.color.ansi16m=uk(),sr.bgColor.ansi=ak(F0),sr.bgColor.ansi256=ck(F0),sr.bgColor.ansi16m=uk(F0),Object.defineProperties(sr,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>sr.rgbToAnsi256(...sr.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(r,n,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>sr.ansi256ToAnsi(sr.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>sr.ansi256ToAnsi(sr.hexToAnsi256(e)),enumerable:!1}}),sr}function dk(t,e,r){return String(t).normalize().replace(/\r\n/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`).map(n=>rre(n,e,r)).join(`
|
|
4
4
|
`)}function B0(t,e){if(typeof t=="string")return ng.aliases.get(t)===e;for(let r of t)if(r!==void 0&&B0(r,e))return!0;return!1}function ire(t,e){if(t===e)return;let r=t.split(`
|
|
@@ -73,7 +73,7 @@ ${Tk}${n.trimStart()}`),r=3+(0,Dc.stripVTControlCharacters)(n.trimStart()).lengt
|
|
|
73
73
|
`),f(),i()};return{start:D,stop:E,message:(x="")=>{a=y(x??a)}}}});function yt(t,e=""){return t.ts.createSourceFile("module.tsx",typeof e=="string"?e:"",t.ts.ScriptTarget.Latest,void 0)}function lg(t,e=""){let r=yt(t,e?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${e}`);return r.statements[0]}function Ur(t,e,r){if(e){let n=t.ts.createPrinter({newLine:t.ts.NewLineKind.LineFeed,removeComments:r});return t.ts.isSourceFile(e)?n.printFile(e).trim()+`
|
|
74
74
|
`:n.printNode(t.ts.EmitHint.Unspecified,e,t.ts.createSourceFile("module.tsx","",t.ts.ScriptTarget.Latest)).trim()+`
|
|
75
75
|
`}return""}var hr=N(()=>{"use strict";h()});var Rk=S((jBe,Nk)=>{"use strict";h();Nk.exports=function(){if(process.env.npm_config_user_agent)return Dre(process.env.npm_config_user_agent)};function Dre(t){let e=t.split(" ")[0],r=e.lastIndexOf("/"),n=e.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:e.substring(r+1)}}});function Pn(t){return t.endsWith(".mapper.tsx")||t.endsWith(".mapper.jsx")||t.endsWith(".mapper.ts")||t.endsWith(".mapper.js")||t.endsWith(".mapper.mjs")}function vt(t,e,r){e=hs(e),r=hs(r),e=t.dirname(e);let n=t.basename(r,t.extname(r));r=t.dirname(r);let i;return n==="index"?i=t.relative(e,r):i=t.relative(e,t.join(r,n)),i=hs(t.normalize(i)),i.startsWith(".")||(i="./"+i),i}function hs(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}function Ec(t,e){let r=t.extname(e),n=t.basename(e,r).split(/[\/\\]/),i=n[n.length-1];return Ok(i==="index"?t.basename(t.dirname(e)):i)}function Ok(t){return Jt(t).replace(/ /g,"")}function Bi(t,e){let r=t.extname(e),n=hs(t.basename(e,r)).split("/").pop();return Jt(n==="index"?t.basename(t.dirname(e)):n)}function Yt(t,e){let r=hs(t.relative(t.getAppRootDir(),e));r=r.split("/").filter(i=>i!=="."&&i!==".."&&i!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=t.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(i=>i.name.includes("next"))?"@/"+r:"~/"+r}function Pt(t,e){let r=e,n=[];for(let i=0;i<2;i++){let s=t.basename(r);if(!s||s==="components")break;n.unshift(s),r=t.dirname(r)}return n.join("/")}function Jt(t){for(t=t.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();t.includes(" ");)t=t.replace(/ /g," ");return t.split(" ").map(e=>e.length>2?e[0].toUpperCase()+e.slice(1):e).join("").trim()}function Jn(t){return t.sort((e,r)=>e.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function Ht(t,e,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${e}`);return n&&(e=n),e=t.normalize(e),(await t.hash(e+"#"+r)).substring(0,8)}async function Mk(t){return(await t.hash(t.getAppRootDir())).substring(0,8)}function $d(t){return typeof t=="number"}function fl(t){return typeof t=="boolean"}function An(t){return typeof t=="string"}function ml(t){return typeof t=="string"?/^[A-Z][A-Za-z0-9]*$/.test(t):!1}function yi(t){return JSON.parse(JSON.stringify(t))}function pg(t,e,r){for(let n of e)if(t.dirname(r).includes(n))return!0;return!1}function Lk(){try{let t=(0,Bk.default)();if(t?.name)return t.name}catch{}return"npm"}function Ere(){return process.platform.startsWith("win")}function or(){return Ere()?'"@builder.io/dev-tools"':"builder.io"}function q0(t){return t.replace(/[^a-zA-Z0-9-_]/g,"_")}var Bk,dt=N(()=>{"use strict";h();Bk=J(Rk(),1)});function _n(t){let e=t.join(t.getAppRootDir(),"tsconfig.json");return t.exists(e)}async function Yn(t,e){async function r(i,s){if(s>10)return;let o=await t.readdir(i);for(let a of o){if(Cre.includes(a))continue;let c=t.join(i,a),u=await t.stat(c);if(u){if(u.isFile()&&a.startsWith("builder-registry."))return c;if(u.isDirectory()){let l=await r(c,s+1);if(l)return l}}}}let n=await r(t.getAppRootDir(),0);if(!n){let s=`builder-registry.${await _n(t)?"ts":"js"}`;return t.join(e,s)}return n}async function gs(t,e){let r=t.resolve("/");for(let n=0;n<20;n++){let i=t.join(e,"package.json"),s=await t.readFile(i);if(s)return JSON.parse(s);if(e===r)break;e=t.dirname(e)}return null}async function $k(t,e){for(let r=0;r<20;r++){let n=t.dirname(e),i=t.join(n,"node_modules");if(await t.exists(i))return i;if(e===t.getAppRootDir())break;e=t.dirname(e)}return t.join(t.getAppRootDir(),"node_modules")}async function jd(t,e,r){let n=await t.readdir(e);return n.includes(r)?t.join(e,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let o=t.join(e,s);if((await t.stat(o)).isDirectory()){let c=await jd(t,o,r);if(c)return c}}))).find(s=>typeof s=="string")}var Cre,dn=N(()=>{"use strict";h();Cre=["node_modules","dist","build","public"]});async function Br(t,e,r){if(!Array.isArray(e)||e.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${e}`);let n=await $k(t,e[0]),i=t.join(n,"typescript","lib"),s=new Map,o={fileExists:a=>{if(a=t.normalize(a),a.includes("node_modules")){let c=Ud.get(a);if(!c){try{t.statSync(a).isFile()?c={exists:!0,content:t.readFileSync(a)}:c={exists:!1}}catch{c={exists:!1}}Ud.set(a,c)}return c.exists}if(!s.has(a))if(t.existsSync(a)){let u=t.statSync(a);s.set(a,u.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>t.normalize(a),getCurrentDirectory:()=>t.cwd(),getDefaultLibFileName:()=>t.join(i,"lib.d.ts"),getDefaultLibLocation:()=>i,getNewLine:()=>`
|
|
76
|
-
`,getSourceFile:a=>{if(a=t.normalize(a),a.includes("node_modules")){let u=Ud.get(a);if(u)return yt(t,u.content)}let c;try{c=t.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let u=t.basename(a),l=t.extname(u).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(c=Uk.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new fg(u)}return a.includes("node_modules")&&(c?Ud.set(a,{exists:!0,content:c}):Ud.set(a,{exists:!1})),yt(t,c)},readFile:a=>{let c=t.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return wre(t,o,e,r)}catch(a){if(a instanceof fg){await Sre(t,a.libName);continue}throw t.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${e[0]}`,{cause:a})}}function wre(t,e,r,n){let i={rootNames:[...r],host:e,options:{}},s=t.ts.findConfigFile(t.dirname(r[0]),o=>t.existsSync(o));if(s){let o=jk.get(s);if(!o){let a=t.ts.readConfigFile(s,c=>{let u=t.readFileSync(c);return typeof u=="string"?u:void 0});a.error?t.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(o=t.ts.parseJsonConfigFileContent(a.config,t.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(u,l)=>t.readdirSync(u),fileExists:u=>t.existsSync(u),readFile:u=>t.readFileSync(u)||void 0},t.dirname(s),void 0,s).options,jk.set(s,o))}o&&(i.options=yi(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=t.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),t.ts.createProgram(i)}async function hl(t,e,r){r||(r=await Br(t,[e]));let n=r.getSourceFile(e);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${e}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function Sre(t,e){let r=`https://cdn.jsdelivr.net/npm/typescript@${t.ts.version}/lib/${e}`;dg.has(e)||dg.set(e,fetch(r).then(n=>n.text()).then(n=>{Uk.set(e,n)})),await dg.get(e),dg.delete(e)}async function qk(t,e){let r=await t.readFile(e.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${e.filePath}`}],code:null,output:null}:z0(t,{code:r,filePath:e.filePath,compilerOptions:e.compilerOptions})}function z0(t,e){let r={diagnostics:[],code:e.code,output:null};try{let n=t.ts.transpileModule(e.code,{compilerOptions:e.compilerOptions,fileName:e.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(i=>{r.diagnostics.push({messageText:String(i.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var fg,Uk,dg,Ud,jk,Mi=N(()=>{"use strict";h();hr();dt();dn();fg=class{libName;constructor(e){this.libName=e}};Uk=new Map,dg=new Map,Ud=new Map,jk=new Map});var Tre,Qe,kr=N(()=>{"use strict";h();Tre="1.17.
|
|
76
|
+
`,getSourceFile:a=>{if(a=t.normalize(a),a.includes("node_modules")){let u=Ud.get(a);if(u)return yt(t,u.content)}let c;try{c=t.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let u=t.basename(a),l=t.extname(u).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(c=Uk.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new fg(u)}return a.includes("node_modules")&&(c?Ud.set(a,{exists:!0,content:c}):Ud.set(a,{exists:!1})),yt(t,c)},readFile:a=>{let c=t.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return wre(t,o,e,r)}catch(a){if(a instanceof fg){await Sre(t,a.libName);continue}throw t.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${e[0]}`,{cause:a})}}function wre(t,e,r,n){let i={rootNames:[...r],host:e,options:{}},s=t.ts.findConfigFile(t.dirname(r[0]),o=>t.existsSync(o));if(s){let o=jk.get(s);if(!o){let a=t.ts.readConfigFile(s,c=>{let u=t.readFileSync(c);return typeof u=="string"?u:void 0});a.error?t.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(o=t.ts.parseJsonConfigFileContent(a.config,t.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(u,l)=>t.readdirSync(u),fileExists:u=>t.existsSync(u),readFile:u=>t.readFileSync(u)||void 0},t.dirname(s),void 0,s).options,jk.set(s,o))}o&&(i.options=yi(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=t.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),t.ts.createProgram(i)}async function hl(t,e,r){r||(r=await Br(t,[e]));let n=r.getSourceFile(e);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${e}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function Sre(t,e){let r=`https://cdn.jsdelivr.net/npm/typescript@${t.ts.version}/lib/${e}`;dg.has(e)||dg.set(e,fetch(r).then(n=>n.text()).then(n=>{Uk.set(e,n)})),await dg.get(e),dg.delete(e)}async function qk(t,e){let r=await t.readFile(e.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${e.filePath}`}],code:null,output:null}:z0(t,{code:r,filePath:e.filePath,compilerOptions:e.compilerOptions})}function z0(t,e){let r={diagnostics:[],code:e.code,output:null};try{let n=t.ts.transpileModule(e.code,{compilerOptions:e.compilerOptions,fileName:e.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(i=>{r.diagnostics.push({messageText:String(i.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var fg,Uk,dg,Ud,jk,Mi=N(()=>{"use strict";h();hr();dt();dn();fg=class{libName;constructor(e){this.libName=e}};Uk=new Map,dg=new Map,Ud=new Map,jk=new Map});var Tre,Qe,kr=N(()=>{"use strict";h();Tre="1.17.17",Qe=process.env.OVERRIDE_VERSION??Tre});async function Cc(t){let e=[],r=await gs(t,t.getRepoRootDir());if(r){let n=await Gk(r,t);e.push(...n)}return e}async function Gk(t,e){let r=[];if(t&&typeof t=="object"){let n=new Set(Object.keys({...t.dependencies,...t.devDependencies}));for(let i of Pre)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};zk.has(i)&&(s.version=await zk.get(i)(e)),r.push(s)}}return r}function G0(t){let e=parseInt(t);return Number.isNaN(e)?void 0:e}var zk,Pre,wc=N(()=>{"use strict";h();dn();dt();zk=new Map([["next",async t=>{if(!t.spawnSync)return;let e=Lk(),r=e==="npm"?"npx":e,{stdout:n}=t.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let i=n.match(/(Next.js v)([\d.]+)/g);if(!i)return;let s=i[0].split("Next.js v")[1],[o,a,c]=s.split(".");return{major:G0(o),minor:G0(a),patch:G0(c)}}]]),Pre=["@shopify/remix-oxygen","@shopify/hydrogen","@builder.io/qwik-city","@remix-run/react","@sveltejs/kit","astro","gatsby","next","nuxt","@builder.io/qwik","@angular/core","react","solid-js","svelte","vue"]});async function Li(t){let e=Vk(t),r=await t.readFile(e);return typeof r=="string"?JSON.parse(r):{}}async function $i(t,e){e=typeof e=="object"&&e!=null?e:{};let r=Vk(t);await t.writeFile(r,JSON.stringify(e??{},null,2))}function Vk(t){let e=t.getAppRootDir();return t.join(e,"node_modules",".builder","builder-cache.json")}var Sc=N(()=>{"use strict";h()});async function Us(t,e,r){let n={envKey:r,envValue:null,file:""};for(let i of e){let s=t.join(t.getAppRootDir(),i),o=await Are(t,s);if(o){let a=o[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=t.join(t.getAppRootDir(),e[e.length-1]),n}async function Are(t,e){let r=await t.readFile(e);return typeof r=="string"?Hk(r):null}function Hk(t){let e={},r=t.replace(/\r\n?/gm,`
|
|
77
77
|
`),n;for(;(n=_re.exec(r))!=null;){let i=n[1],s=n[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
|
|
78
78
|
`),s=s.replace(/\\r/g,"\r")),e[i]=s}return e}async function qs(t,e,r,n){let i="# https://www.builder.io/c/docs/using-your-api-key",s=await t.readFile(e);try{if(s)if(s.includes(r))if(s.includes(n))t.debug(`"${r}" with "${n}" already set in ${e}`);else return t.debug(`Replace "${r}" in ${e}`),s=s.replace(new RegExp(`${r}=.*`),`${r}=${n}`),await t.writeFile(e,s),"update";else return t.debug(`Append "${r}" to ${e}`),s+=`
|
|
79
79
|
|
|
@@ -1106,25 +1106,25 @@ https://github.com/highlightjs/highlight.js/issues/2277`),H=j,$=G),Q===void 0&&(
|
|
|
1106
1106
|
`:`
|
|
1107
1107
|
`)+r,i=n+1,n=t.indexOf(`
|
|
1108
1108
|
`,i)}while(n!==-1);return s+=t.slice(i),s}var iB=N(()=>{h()});function mf(t){return cB(t)}var sB,oB,lE,Ol,ff,aB,Bl,xae,Wg,cB,pE,Dae,Eae,dE,Jg,Cae,f7e,m7e,uB=N(()=>{h();XO();tB();iB();({stdout:sB,stderr:oB}=eB),lE=Symbol("GENERATOR"),Ol=Symbol("STYLER"),ff=Symbol("IS_EMPTY"),aB=["ansi","ansi","ansi256","ansi16m"],Bl=Object.create(null),xae=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=sB?sB.level:0;t.level=e.level===void 0?r:e.level},Wg=class{constructor(e){return cB(e)}},cB=t=>{let e=(...r)=>r.join(" ");return xae(e,t),Object.setPrototypeOf(e,mf.prototype),e};Object.setPrototypeOf(mf.prototype,Function.prototype);for(let[t,e]of Object.entries(Ds))Bl[t]={get(){let r=Jg(this,dE(e.open,e.close,this[Ol]),this[ff]);return Object.defineProperty(this,t,{value:r}),r}};Bl.visible={get(){let t=Jg(this,this[Ol],!0);return Object.defineProperty(this,"visible",{value:t}),t}};pE=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?Ds[r].ansi16m(...n):e==="ansi256"?Ds[r].ansi256(Ds.rgbToAnsi256(...n)):Ds[r].ansi(Ds.rgbToAnsi(...n)):t==="hex"?pE("rgb",e,r,...Ds.hexToRgb(...n)):Ds[r][t](...n),Dae=["rgb","hex","ansi256"];for(let t of Dae){Bl[t]={get(){let{level:r}=this;return function(...n){let i=dE(pE(t,aB[r],"color",...n),Ds.color.close,this[Ol]);return Jg(this,i,this[ff])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);Bl[e]={get(){let{level:r}=this;return function(...n){let i=dE(pE(t,aB[r],"bgColor",...n),Ds.bgColor.close,this[Ol]);return Jg(this,i,this[ff])}}}}Eae=Object.defineProperties(()=>{},{...Bl,level:{enumerable:!0,get(){return this[lE].level},set(t){this[lE].level=t}}}),dE=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Jg=(t,e,r)=>{let n=(...i)=>Cae(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,Eae),n[lE]=t,n[Ol]=e,n[ff]=r,n},Cae=(t,e)=>{if(t.level<=0||!e)return t[ff]?"":e;let r=t[Ol];if(r===void 0)return e;let{openAll:n,closeAll:i}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=rB(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
|
|
1109
|
-
`);return s!==-1&&(e=nB(e,i,n,s)),n+e+i};Object.defineProperties(mf.prototype,Bl);f7e=mf(),m7e=mf({level:oB?oB.level:0})});function hf(t){let e=aE(t);return{highlight:r,highlightAuto:n,listLanguages:e.listLanguages,register:e.register,registerAlias:e.registerAlias,registered:e.registered};function r(i,s,o){let a=e.highlight(i,s),c=a.data;return{language:c.language,relevance:c.relevance,value:fE(o||lB,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let l=s;a={subset:l.subset},o=l.sheet}else o=s;let c=e.highlightAuto(i,a),u=c.data;return{language:u.language,relevance:u.relevance,value:fE(o||lB,c)}}}function fE(t,e){let r=new Set(e.type==="element"&&Array.isArray(e.properties.className)?e.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in t)if(Object.hasOwn(t,o)){let a=o.split(" "),c=t[o];r.has(a[0])?a.length===1?i=c:n[a.slice(1).join(" ")]=c:n[o]=c}return"value"in e?s=e.value:"children"in e&&(s=wae(n,e.children)),i&&(s=i(s)),s}function wae(t,e){let r=[],n=-1;for(;++n<e.length;)r.push(fE(t,e[n]));return r.join("")}var ft,lB,pB=N(()=>{h();uB();cE();ft=new Wg({level:2}),lB={comment:ft.gray,quote:ft.gray,keyword:ft.green,"selector-tag":ft.green,addition:ft.green,number:ft.cyan,string:ft.cyan,"meta meta-string":ft.cyan,literal:ft.cyan,doctag:ft.cyan,regexp:ft.cyan,title:ft.blue,section:ft.blue,name:ft.blue,"selector-id":ft.blue,"selector-class":ft.blue,attribute:ft.yellow,attr:ft.yellow,variable:ft.yellow,"template-variable":ft.yellow,"class title":ft.yellow,type:ft.yellow,symbol:ft.magenta,bullet:ft.magenta,subst:ft.magenta,meta:ft.magenta,"meta keyword":ft.magenta,"selector-attr":ft.magenta,"selector-pseudo":ft.magenta,link:ft.magenta,built_in:ft.red,deletion:ft.red,emphasis:ft.italic,strong:ft.bold,formula:ft.inverse}});var mE=N(()=>{h();cE();pB()});async function be(t){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([dB.flush(2e3),fB.flush().promise])}catch(e){console.error(e)}process.exit(t)}var dB,fB,zi=N(()=>{"use strict";h();dB=J(require("@sentry/node"),1),fB=J(require("@amplitude/analytics-node"),1)});var tt,In=N(()=>{"use strict";h();tt=process.env.AIR_HOST||"https://api.builder.io"});var hB,mB=N(()=>{hB="1.17.16"});var yB=S(hE=>{h();var gB="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");hE.encode=function(t){if(0<=t&&t<gB.length)return gB[t];throw new TypeError("Must be between 0 and 63: "+t)};hE.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,c=47,u=26,l=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:s<=t&&t<=o?t-s+l:t==a?62:t==c?63:-1}});var vE=S(yE=>{h();var vB=yB(),gE=5,bB=1<<gE,xB=bB-1,DB=bB;function Tae(t){return t<0?(-t<<1)+1:(t<<1)+0}function Pae(t){var e=(t&1)===1,r=t>>1;return e?-r:r}yE.encode=function(e){var r="",n,i=Tae(e);do n=i&xB,i>>>=gE,i>0&&(n|=DB),r+=vB.encode(n);while(i>0);return r};yE.decode=function(e,r,n){var i=e.length,s=0,o=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=vB.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&DB),c&=xB,s=s+(c<<o),o+=gE}while(a);n.value=Pae(s),n.rest=r}});var Ll=S(Vr=>{h();function Aae(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Vr.getArg=Aae;var EB=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,_ae=/^data:.+\,.+$/;function gf(t){var e=t.match(EB);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Vr.urlParse=gf;function Ml(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Vr.urlGenerate=Ml;var Fae=32;function kae(t){var e=[];return function(r){for(var n=0;n<e.length;n++)if(e[n].input===r){var i=e[0];return e[0]=e[n],e[n]=i,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>Fae&&e.pop(),s}}var bE=kae(function(e){var r=e,n=gf(e);if(n){if(!n.path)return e;r=n.path}for(var i=Vr.isAbsolute(r),s=[],o=0,a=0;;)if(o=a,a=r.indexOf("/",o),a===-1){s.push(r.slice(o));break}else for(s.push(r.slice(o,a));a<r.length&&r[a]==="/";)a++;for(var c,u=0,a=s.length-1;a>=0;a--)c=s[a],c==="."?s.splice(a,1):c===".."?u++:u>0&&(c===""?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Ml(n)):r});Vr.normalize=bE;function CB(t,e){t===""&&(t="."),e===""&&(e=".");var r=gf(e),n=gf(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Ml(r);if(r||e.match(_ae))return e;if(n&&!n.host&&!n.path)return n.host=e,Ml(n);var i=e.charAt(0)==="/"?e:bE(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Ml(n)):i}Vr.join=CB;Vr.isAbsolute=function(t){return t.charAt(0)==="/"||EB.test(t)};function Iae(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Vr.relative=Iae;var wB=(function(){var t=Object.create(null);return!("__proto__"in t)})();function SB(t){return t}function Nae(t){return TB(t)?"$"+t:t}Vr.toSetString=wB?SB:Nae;function Rae(t){return TB(t)?t.slice(1):t}Vr.fromSetString=wB?SB:Rae;function TB(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function Oae(t,e,r){var n=jo(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:jo(t.name,e.name)}Vr.compareByOriginalPositions=Oae;function Bae(t,e,r){var n;return n=t.originalLine-e.originalLine,n!==0||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:jo(t.name,e.name)}Vr.compareByOriginalPositionsNoSource=Bae;function Mae(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=jo(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:jo(t.name,e.name)}Vr.compareByGeneratedPositionsDeflated=Mae;function Lae(t,e,r){var n=t.generatedColumn-e.generatedColumn;return n!==0||r||(n=jo(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:jo(t.name,e.name)}Vr.compareByGeneratedPositionsDeflatedNoLine=Lae;function jo(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function $ae(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=jo(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:jo(t.name,e.name)}Vr.compareByGeneratedPositionsInflated=$ae;function jae(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Vr.parseSourceMapInput=jae;function Uae(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=gf(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=CB(Ml(n),e)}return bE(e)}Vr.computeSourceURL=Uae});var EE=S(PB=>{h();var xE=Ll(),DE=Object.prototype.hasOwnProperty,Mc=typeof Map<"u";function Uo(){this._array=[],this._set=Mc?new Map:Object.create(null)}Uo.fromArray=function(e,r){for(var n=new Uo,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};Uo.prototype.size=function(){return Mc?this._set.size:Object.getOwnPropertyNames(this._set).length};Uo.prototype.add=function(e,r){var n=Mc?e:xE.toSetString(e),i=Mc?this.has(e):DE.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(Mc?this._set.set(e,s):this._set[n]=s)};Uo.prototype.has=function(e){if(Mc)return this._set.has(e);var r=xE.toSetString(e);return DE.call(this._set,r)};Uo.prototype.indexOf=function(e){if(Mc){var r=this._set.get(e);if(r>=0)return r}else{var n=xE.toSetString(e);if(DE.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Uo.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Uo.prototype.toArray=function(){return this._array.slice()};PB.ArraySet=Uo});var FB=S(_B=>{h();var AB=Ll();function qae(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||AB.compareByGeneratedPositionsInflated(t,e)<=0}function Yg(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Yg.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Yg.prototype.add=function(e){qae(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Yg.prototype.toArray=function(){return this._sorted||(this._array.sort(AB.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};_B.MappingList=Yg});var CE=S(kB=>{h();var yf=vE(),wr=Ll(),Xg=EE().ArraySet,zae=FB().MappingList;function Gi(t){t||(t={}),this._file=wr.getArg(t,"file",null),this._sourceRoot=wr.getArg(t,"sourceRoot",null),this._skipValidation=wr.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=wr.getArg(t,"ignoreInvalidMapping",!1),this._sources=new Xg,this._names=new Xg,this._mappings=new zae,this._sourcesContents=null}Gi.prototype._version=3;Gi.fromSourceMap=function(e,r){var n=e.sourceRoot,i=new Gi(Object.assign(r||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,n!=null&&(o.source=wr.relative(n,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),i.addMapping(o)}),e.sources.forEach(function(s){var o=s;n!==null&&(o=wr.relative(n,s)),i._sources.has(o)||i._sources.add(o);var a=e.sourceContentFor(s);a!=null&&i.setSourceContent(s,a)}),i};Gi.prototype.addMapping=function(e){var r=wr.getArg(e,"generated"),n=wr.getArg(e,"original",null),i=wr.getArg(e,"source",null),s=wr.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};Gi.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=wr.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[wr.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[wr.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Gi.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=wr.relative(s,i));var o=new Xg,a=new Xg;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=wr.join(n,c.source)),s!=null&&(c.source=wr.relative(s,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var l=c.source;l!=null&&!o.has(l)&&o.add(l);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=o,this._names=a,e.sources.forEach(function(c){var u=e.sourceContentFor(c);u!=null&&(n!=null&&(c=wr.join(n,c)),s!=null&&(c=wr.relative(s,c)),this.setSourceContent(c,u))},this)};Gi.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Gi.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",c,u,l,p,d=this._mappings.toArray(),m=0,f=d.length;m<f;m++){if(u=d[m],c="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)c+=";",r++;else if(m>0){if(!wr.compareByGeneratedPositionsInflated(u,d[m-1]))continue;c+=","}c+=yf.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=yf.encode(p-o),o=p,c+=yf.encode(u.originalLine-1-i),i=u.originalLine-1,c+=yf.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(l=this._names.indexOf(u.name),c+=yf.encode(l-s),s=l)),a+=c}return a};Gi.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=wr.relative(r,n));var i=wr.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Gi.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Gi.prototype.toString=function(){return JSON.stringify(this.toJSON())};kB.SourceMapGenerator=Gi});var IB=S(Lc=>{h();Lc.GREATEST_LOWER_BOUND=1;Lc.LEAST_UPPER_BOUND=2;function wE(t,e,r,n,i,s){var o=Math.floor((e-t)/2)+t,a=i(r,n[o],!0);return a===0?o:a>0?e-o>1?wE(o,e,r,n,i,s):s==Lc.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?wE(t,o,r,n,i,s):s==Lc.LEAST_UPPER_BOUND?o:t<0?-1:t}Lc.search=function(e,r,n,i){if(r.length===0)return-1;var s=wE(-1,r.length,e,r,n,i||Lc.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var OB=S(RB=>{h();function Gae(t){function e(i,s,o){var a=i[s];i[s]=i[o],i[o]=a}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,o,a){if(o<a){var c=r(o,a),u=o-1;e(i,c,a);for(var l=i[a],p=o;p<a;p++)s(i[p],l,!1)<=0&&(u+=1,e(i,u,p));e(i,u+1,p);var d=u+1;n(i,s,o,d-1),n(i,s,d+1,a)}}return n}function Vae(t){let e=Gae.toString();return new Function(`return ${e}`)()(t)}var NB=new WeakMap;RB.quickSort=function(t,e,r=0){let n=NB.get(e);n===void 0&&(n=Vae(e),NB.set(e,n)),n(t,e,r,t.length-1)}});var LB=S(Qg=>{h();var Te=Ll(),TE=IB(),$l=EE().ArraySet,Hae=vE(),vf=OB().quickSort;function tr(t,e){var r=t;return typeof t=="string"&&(r=Te.parseSourceMapInput(t)),r.sections!=null?new Es(r,e):new sn(r,e)}tr.fromSourceMap=function(t,e){return sn.fromSourceMap(t,e)};tr.prototype._version=3;tr.prototype.__generatedMappings=null;Object.defineProperty(tr.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});tr.prototype.__originalMappings=null;Object.defineProperty(tr.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});tr.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};tr.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};tr.GENERATED_ORDER=1;tr.ORIGINAL_ORDER=2;tr.GREATEST_LOWER_BOUND=1;tr.LEAST_UPPER_BOUND=2;tr.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||tr.GENERATED_ORDER,o;switch(s){case tr.GENERATED_ORDER:o=this._generatedMappings;break;case tr.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,c=e.bind(i),u=this._names,l=this._sources,p=this._sourceMapURL,d=0,m=o.length;d<m;d++){var f=o[d],g=f.source===null?null:l.at(f.source);g!==null&&(g=Te.computeSourceURL(a,g,p)),c({source:g,generatedLine:f.generatedLine,generatedColumn:f.generatedColumn,originalLine:f.originalLine,originalColumn:f.originalColumn,name:f.name===null?null:u.at(f.name)})}};tr.prototype.allGeneratedPositionsFor=function(e){var r=Te.getArg(e,"line"),n={source:Te.getArg(e,"source"),originalLine:r,originalColumn:Te.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Te.compareByOriginalPositions,TE.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:Te.getArg(o,"generatedLine",null),column:Te.getArg(o,"generatedColumn",null),lastColumn:Te.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==c;)i.push({line:Te.getArg(o,"generatedLine",null),column:Te.getArg(o,"generatedColumn",null),lastColumn:Te.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};Qg.SourceMapConsumer=tr;function sn(t,e){var r=t;typeof t=="string"&&(r=Te.parseSourceMapInput(t));var n=Te.getArg(r,"version"),i=Te.getArg(r,"sources"),s=Te.getArg(r,"names",[]),o=Te.getArg(r,"sourceRoot",null),a=Te.getArg(r,"sourcesContent",null),c=Te.getArg(r,"mappings"),u=Te.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=Te.normalize(o)),i=i.map(String).map(Te.normalize).map(function(l){return o&&Te.isAbsolute(o)&&Te.isAbsolute(l)?Te.relative(o,l):l}),this._names=$l.fromArray(s.map(String),!0),this._sources=$l.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(l){return Te.computeSourceURL(o,l,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=u}sn.prototype=Object.create(tr.prototype);sn.prototype.consumer=tr;sn.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=Te.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};sn.fromSourceMap=function(e,r){var n=Object.create(sn.prototype),i=n._names=$l.fromArray(e._names.toArray(),!0),s=n._sources=$l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return Te.computeSourceURL(n.sourceRoot,m,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,l=o.length;u<l;u++){var p=o[u],d=new MB;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=s.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return vf(n.__originalMappings,Te.compareByOriginalPositions),n};sn.prototype._version=3;Object.defineProperty(sn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function MB(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var SE=Te.compareByGeneratedPositionsDeflatedNoLine;function BB(t,e){let r=t.length,n=t.length-e;if(!(n<=1))if(n==2){let i=t[e],s=t[e+1];SE(i,s)>0&&(t[e]=s,t[e+1]=i)}else if(n<20)for(let i=e;i<r;i++)for(let s=i;s>e;s--){let o=t[s-1],a=t[s];if(SE(o,a)<=0)break;t[s-1]=a,t[s]=o}else vf(t,SE,e)}sn.prototype._parseMappings=function(e,r){var n=1,i=0,s=0,o=0,a=0,c=0,u=e.length,l=0,p={},d={},m=[],f=[],g,y,v,D,E;let x=0;for(;l<u;)if(e.charAt(l)===";")n++,l++,i=0,BB(f,x),x=f.length;else if(e.charAt(l)===",")l++;else{for(g=new MB,g.generatedLine=n,D=l;D<u&&!this._charIsMappingSeparator(e,D);D++);for(y=e.slice(l,D),v=[];l<D;)Hae.decode(e,l,d),E=d.value,l=d.rest,v.push(E);if(v.length===2)throw new Error("Found a source, but no line and column");if(v.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=i+v[0],i=g.generatedColumn,v.length>1&&(g.source=a+v[1],a+=v[1],g.originalLine=s+v[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+v[3],o=g.originalColumn,v.length>4&&(g.name=c+v[4],c+=v[4])),f.push(g),typeof g.originalLine=="number"){let C=g.source;for(;m.length<=C;)m.push(null);m[C]===null&&(m[C]=[]),m[C].push(g)}}BB(f,x),this.__generatedMappings=f;for(var b=0;b<m.length;b++)m[b]!=null&&vf(m[b],Te.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...m)};sn.prototype._findMapping=function(e,r,n,i,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return TE.search(e,r,s,o)};sn.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};sn.prototype.originalPositionFor=function(e){var r={generatedLine:Te.getArg(e,"line"),generatedColumn:Te.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",Te.compareByGeneratedPositionsDeflated,Te.getArg(e,"bias",tr.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=Te.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=Te.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=Te.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:Te.getArg(i,"originalLine",null),column:Te.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};sn.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};sn.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=Te.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=Te.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};sn.prototype.generatedPositionFor=function(e){var r=Te.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:Te.getArg(e,"line"),originalColumn:Te.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Te.compareByOriginalPositions,Te.getArg(e,"bias",tr.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:Te.getArg(s,"generatedLine",null),column:Te.getArg(s,"generatedColumn",null),lastColumn:Te.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Qg.BasicSourceMapConsumer=sn;function Es(t,e){var r=t;typeof t=="string"&&(r=Te.parseSourceMapInput(t));var n=Te.getArg(r,"version"),i=Te.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new $l,this._names=new $l;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=Te.getArg(o,"offset"),c=Te.getArg(a,"line"),u=Te.getArg(a,"column");if(c<s.line||c===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new tr(Te.getArg(o,"map"),e)}})}Es.prototype=Object.create(tr.prototype);Es.prototype.constructor=tr;Es.prototype._version=3;Object.defineProperty(Es.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});Es.prototype.originalPositionFor=function(e){var r={generatedLine:Te.getArg(e,"line"),generatedColumn:Te.getArg(e,"column")},n=TE.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Es.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Es.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Es.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(Te.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Es.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c!==null&&(c=Te.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var l={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),typeof l.originalLine=="number"&&this.__originalMappings.push(l)}vf(this.__generatedMappings,Te.compareByGeneratedPositionsDeflated),vf(this.__originalMappings,Te.compareByOriginalPositions)};Qg.IndexedSourceMapConsumer=Es});var jB=S($B=>{h();var Kae=CE().SourceMapGenerator,Zg=Ll(),Wae=/(\r?\n)/,Jae=10,jl="$$$isSourceNode$$$";function bi(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[jl]=!0,n!=null&&this.add(n)}bi.fromStringWithSourceMap=function(e,r,n){var i=new bi,s=e.split(Wae),o=0,a=function(){var d=f(),m=f()||"";return d+m;function f(){return o<s.length?s[o++]:void 0}},c=1,u=0,l=null;return r.eachMapping(function(d){if(l!==null)if(c<d.generatedLine)p(l,a()),c++,u=0;else{var m=s[o]||"",f=m.substr(0,d.generatedColumn-u);s[o]=m.substr(d.generatedColumn-u),u=d.generatedColumn,p(l,f),l=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(u<d.generatedColumn){var m=s[o]||"";i.add(m.substr(0,d.generatedColumn)),s[o]=m.substr(d.generatedColumn),u=d.generatedColumn}l=d},this),o<s.length&&(l&&p(l,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=Zg.join(n,d)),i.setSourceContent(d,m))}),i;function p(d,m){if(d===null||d.source===void 0)i.add(m);else{var f=n?Zg.join(n,d.source):d.source;i.add(new bi(d.originalLine,d.originalColumn,f,m,d.name))}}};bi.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[jl]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};bi.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[jl]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};bi.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[jl]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};bi.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};bi.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[jl]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};bi.prototype.setSourceContent=function(e,r){this.sourceContents[Zg.toSetString(e)]=r};bi.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][jl]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Zg.fromSetString(i[r]),this.sourceContents[i[r]])};bi.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};bi.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new Kae(e),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(u,l){r.code+=u,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||c!==l.name)&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,c=l.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===Jae?(r.line++,r.column=0,p+1===d?(s=null,i=!1):i&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(u,l){n.setSourceContent(u,l)}),{code:r.code,map:n}};$B.SourceNode=bi});var UB=S(ey=>{h();ey.SourceMapGenerator=CE().SourceMapGenerator;ey.SourceMapConsumer=LB().SourceMapConsumer;ey.SourceNode=jB().SourceNode});var vM=S(Af=>{"use strict";h();Object.defineProperty(Af,"__esModule",{value:!0});function Yae(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}var ro=class{constructor(e,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=r,this.index=n}},Vl=class{constructor(e,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=r}};function Rn(t,e){let{line:r,column:n,index:i}=t;return new ro(r,n+e,i+e)}var qB="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Xae={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:qB},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:qB}},zB={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},ny=t=>t.type==="UpdateExpression"?zB.UpdateExpression[`${t.prefix}`]:zB[t.type],Qae={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:t})=>`'import.${t}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
1109
|
+
`);return s!==-1&&(e=nB(e,i,n,s)),n+e+i};Object.defineProperties(mf.prototype,Bl);f7e=mf(),m7e=mf({level:oB?oB.level:0})});function hf(t){let e=aE(t);return{highlight:r,highlightAuto:n,listLanguages:e.listLanguages,register:e.register,registerAlias:e.registerAlias,registered:e.registered};function r(i,s,o){let a=e.highlight(i,s),c=a.data;return{language:c.language,relevance:c.relevance,value:fE(o||lB,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let l=s;a={subset:l.subset},o=l.sheet}else o=s;let c=e.highlightAuto(i,a),u=c.data;return{language:u.language,relevance:u.relevance,value:fE(o||lB,c)}}}function fE(t,e){let r=new Set(e.type==="element"&&Array.isArray(e.properties.className)?e.properties.className.map(function(a){return String(a).replace(/^hljs-/,"")}):[]),n={},i,s="",o;for(o in t)if(Object.hasOwn(t,o)){let a=o.split(" "),c=t[o];r.has(a[0])?a.length===1?i=c:n[a.slice(1).join(" ")]=c:n[o]=c}return"value"in e?s=e.value:"children"in e&&(s=wae(n,e.children)),i&&(s=i(s)),s}function wae(t,e){let r=[],n=-1;for(;++n<e.length;)r.push(fE(t,e[n]));return r.join("")}var ft,lB,pB=N(()=>{h();uB();cE();ft=new Wg({level:2}),lB={comment:ft.gray,quote:ft.gray,keyword:ft.green,"selector-tag":ft.green,addition:ft.green,number:ft.cyan,string:ft.cyan,"meta meta-string":ft.cyan,literal:ft.cyan,doctag:ft.cyan,regexp:ft.cyan,title:ft.blue,section:ft.blue,name:ft.blue,"selector-id":ft.blue,"selector-class":ft.blue,attribute:ft.yellow,attr:ft.yellow,variable:ft.yellow,"template-variable":ft.yellow,"class title":ft.yellow,type:ft.yellow,symbol:ft.magenta,bullet:ft.magenta,subst:ft.magenta,meta:ft.magenta,"meta keyword":ft.magenta,"selector-attr":ft.magenta,"selector-pseudo":ft.magenta,link:ft.magenta,built_in:ft.red,deletion:ft.red,emphasis:ft.italic,strong:ft.bold,formula:ft.inverse}});var mE=N(()=>{h();cE();pB()});async function be(t){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([dB.flush(2e3),fB.flush().promise])}catch(e){console.error(e)}process.exit(t)}var dB,fB,zi=N(()=>{"use strict";h();dB=J(require("@sentry/node"),1),fB=J(require("@amplitude/analytics-node"),1)});var tt,In=N(()=>{"use strict";h();tt=process.env.AIR_HOST||"https://api.builder.io"});var hB,mB=N(()=>{hB="1.17.17"});var yB=S(hE=>{h();var gB="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");hE.encode=function(t){if(0<=t&&t<gB.length)return gB[t];throw new TypeError("Must be between 0 and 63: "+t)};hE.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,c=47,u=26,l=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:s<=t&&t<=o?t-s+l:t==a?62:t==c?63:-1}});var vE=S(yE=>{h();var vB=yB(),gE=5,bB=1<<gE,xB=bB-1,DB=bB;function Tae(t){return t<0?(-t<<1)+1:(t<<1)+0}function Pae(t){var e=(t&1)===1,r=t>>1;return e?-r:r}yE.encode=function(e){var r="",n,i=Tae(e);do n=i&xB,i>>>=gE,i>0&&(n|=DB),r+=vB.encode(n);while(i>0);return r};yE.decode=function(e,r,n){var i=e.length,s=0,o=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=vB.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(c&DB),c&=xB,s=s+(c<<o),o+=gE}while(a);n.value=Pae(s),n.rest=r}});var Ll=S(Vr=>{h();function Aae(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Vr.getArg=Aae;var EB=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,_ae=/^data:.+\,.+$/;function gf(t){var e=t.match(EB);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Vr.urlParse=gf;function Ml(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Vr.urlGenerate=Ml;var Fae=32;function kae(t){var e=[];return function(r){for(var n=0;n<e.length;n++)if(e[n].input===r){var i=e[0];return e[0]=e[n],e[n]=i,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>Fae&&e.pop(),s}}var bE=kae(function(e){var r=e,n=gf(e);if(n){if(!n.path)return e;r=n.path}for(var i=Vr.isAbsolute(r),s=[],o=0,a=0;;)if(o=a,a=r.indexOf("/",o),a===-1){s.push(r.slice(o));break}else for(s.push(r.slice(o,a));a<r.length&&r[a]==="/";)a++;for(var c,u=0,a=s.length-1;a>=0;a--)c=s[a],c==="."?s.splice(a,1):c===".."?u++:u>0&&(c===""?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Ml(n)):r});Vr.normalize=bE;function CB(t,e){t===""&&(t="."),e===""&&(e=".");var r=gf(e),n=gf(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Ml(r);if(r||e.match(_ae))return e;if(n&&!n.host&&!n.path)return n.host=e,Ml(n);var i=e.charAt(0)==="/"?e:bE(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Ml(n)):i}Vr.join=CB;Vr.isAbsolute=function(t){return t.charAt(0)==="/"||EB.test(t)};function Iae(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Vr.relative=Iae;var wB=(function(){var t=Object.create(null);return!("__proto__"in t)})();function SB(t){return t}function Nae(t){return TB(t)?"$"+t:t}Vr.toSetString=wB?SB:Nae;function Rae(t){return TB(t)?t.slice(1):t}Vr.fromSetString=wB?SB:Rae;function TB(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function Oae(t,e,r){var n=jo(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:jo(t.name,e.name)}Vr.compareByOriginalPositions=Oae;function Bae(t,e,r){var n;return n=t.originalLine-e.originalLine,n!==0||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:jo(t.name,e.name)}Vr.compareByOriginalPositionsNoSource=Bae;function Mae(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=jo(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:jo(t.name,e.name)}Vr.compareByGeneratedPositionsDeflated=Mae;function Lae(t,e,r){var n=t.generatedColumn-e.generatedColumn;return n!==0||r||(n=jo(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:jo(t.name,e.name)}Vr.compareByGeneratedPositionsDeflatedNoLine=Lae;function jo(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function $ae(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=jo(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:jo(t.name,e.name)}Vr.compareByGeneratedPositionsInflated=$ae;function jae(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Vr.parseSourceMapInput=jae;function Uae(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=gf(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=CB(Ml(n),e)}return bE(e)}Vr.computeSourceURL=Uae});var EE=S(PB=>{h();var xE=Ll(),DE=Object.prototype.hasOwnProperty,Mc=typeof Map<"u";function Uo(){this._array=[],this._set=Mc?new Map:Object.create(null)}Uo.fromArray=function(e,r){for(var n=new Uo,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};Uo.prototype.size=function(){return Mc?this._set.size:Object.getOwnPropertyNames(this._set).length};Uo.prototype.add=function(e,r){var n=Mc?e:xE.toSetString(e),i=Mc?this.has(e):DE.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(Mc?this._set.set(e,s):this._set[n]=s)};Uo.prototype.has=function(e){if(Mc)return this._set.has(e);var r=xE.toSetString(e);return DE.call(this._set,r)};Uo.prototype.indexOf=function(e){if(Mc){var r=this._set.get(e);if(r>=0)return r}else{var n=xE.toSetString(e);if(DE.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};Uo.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Uo.prototype.toArray=function(){return this._array.slice()};PB.ArraySet=Uo});var FB=S(_B=>{h();var AB=Ll();function qae(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||AB.compareByGeneratedPositionsInflated(t,e)<=0}function Yg(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Yg.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Yg.prototype.add=function(e){qae(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Yg.prototype.toArray=function(){return this._sorted||(this._array.sort(AB.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};_B.MappingList=Yg});var CE=S(kB=>{h();var yf=vE(),wr=Ll(),Xg=EE().ArraySet,zae=FB().MappingList;function Gi(t){t||(t={}),this._file=wr.getArg(t,"file",null),this._sourceRoot=wr.getArg(t,"sourceRoot",null),this._skipValidation=wr.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=wr.getArg(t,"ignoreInvalidMapping",!1),this._sources=new Xg,this._names=new Xg,this._mappings=new zae,this._sourcesContents=null}Gi.prototype._version=3;Gi.fromSourceMap=function(e,r){var n=e.sourceRoot,i=new Gi(Object.assign(r||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,n!=null&&(o.source=wr.relative(n,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),i.addMapping(o)}),e.sources.forEach(function(s){var o=s;n!==null&&(o=wr.relative(n,s)),i._sources.has(o)||i._sources.add(o);var a=e.sourceContentFor(s);a!=null&&i.setSourceContent(s,a)}),i};Gi.prototype.addMapping=function(e){var r=wr.getArg(e,"generated"),n=wr.getArg(e,"original",null),i=wr.getArg(e,"source",null),s=wr.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};Gi.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=wr.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[wr.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[wr.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Gi.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=wr.relative(s,i));var o=new Xg,a=new Xg;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=wr.join(n,c.source)),s!=null&&(c.source=wr.relative(s,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var l=c.source;l!=null&&!o.has(l)&&o.add(l);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=o,this._names=a,e.sources.forEach(function(c){var u=e.sourceContentFor(c);u!=null&&(n!=null&&(c=wr.join(n,c)),s!=null&&(c=wr.relative(s,c)),this.setSourceContent(c,u))},this)};Gi.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Gi.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",c,u,l,p,d=this._mappings.toArray(),m=0,f=d.length;m<f;m++){if(u=d[m],c="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)c+=";",r++;else if(m>0){if(!wr.compareByGeneratedPositionsInflated(u,d[m-1]))continue;c+=","}c+=yf.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=yf.encode(p-o),o=p,c+=yf.encode(u.originalLine-1-i),i=u.originalLine-1,c+=yf.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(l=this._names.indexOf(u.name),c+=yf.encode(l-s),s=l)),a+=c}return a};Gi.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=wr.relative(r,n));var i=wr.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Gi.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Gi.prototype.toString=function(){return JSON.stringify(this.toJSON())};kB.SourceMapGenerator=Gi});var IB=S(Lc=>{h();Lc.GREATEST_LOWER_BOUND=1;Lc.LEAST_UPPER_BOUND=2;function wE(t,e,r,n,i,s){var o=Math.floor((e-t)/2)+t,a=i(r,n[o],!0);return a===0?o:a>0?e-o>1?wE(o,e,r,n,i,s):s==Lc.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?wE(t,o,r,n,i,s):s==Lc.LEAST_UPPER_BOUND?o:t<0?-1:t}Lc.search=function(e,r,n,i){if(r.length===0)return-1;var s=wE(-1,r.length,e,r,n,i||Lc.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var OB=S(RB=>{h();function Gae(t){function e(i,s,o){var a=i[s];i[s]=i[o],i[o]=a}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,o,a){if(o<a){var c=r(o,a),u=o-1;e(i,c,a);for(var l=i[a],p=o;p<a;p++)s(i[p],l,!1)<=0&&(u+=1,e(i,u,p));e(i,u+1,p);var d=u+1;n(i,s,o,d-1),n(i,s,d+1,a)}}return n}function Vae(t){let e=Gae.toString();return new Function(`return ${e}`)()(t)}var NB=new WeakMap;RB.quickSort=function(t,e,r=0){let n=NB.get(e);n===void 0&&(n=Vae(e),NB.set(e,n)),n(t,e,r,t.length-1)}});var LB=S(Qg=>{h();var Te=Ll(),TE=IB(),$l=EE().ArraySet,Hae=vE(),vf=OB().quickSort;function tr(t,e){var r=t;return typeof t=="string"&&(r=Te.parseSourceMapInput(t)),r.sections!=null?new Es(r,e):new sn(r,e)}tr.fromSourceMap=function(t,e){return sn.fromSourceMap(t,e)};tr.prototype._version=3;tr.prototype.__generatedMappings=null;Object.defineProperty(tr.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});tr.prototype.__originalMappings=null;Object.defineProperty(tr.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});tr.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};tr.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};tr.GENERATED_ORDER=1;tr.ORIGINAL_ORDER=2;tr.GREATEST_LOWER_BOUND=1;tr.LEAST_UPPER_BOUND=2;tr.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||tr.GENERATED_ORDER,o;switch(s){case tr.GENERATED_ORDER:o=this._generatedMappings;break;case tr.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,c=e.bind(i),u=this._names,l=this._sources,p=this._sourceMapURL,d=0,m=o.length;d<m;d++){var f=o[d],g=f.source===null?null:l.at(f.source);g!==null&&(g=Te.computeSourceURL(a,g,p)),c({source:g,generatedLine:f.generatedLine,generatedColumn:f.generatedColumn,originalLine:f.originalLine,originalColumn:f.originalColumn,name:f.name===null?null:u.at(f.name)})}};tr.prototype.allGeneratedPositionsFor=function(e){var r=Te.getArg(e,"line"),n={source:Te.getArg(e,"source"),originalLine:r,originalColumn:Te.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Te.compareByOriginalPositions,TE.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:Te.getArg(o,"generatedLine",null),column:Te.getArg(o,"generatedColumn",null),lastColumn:Te.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==c;)i.push({line:Te.getArg(o,"generatedLine",null),column:Te.getArg(o,"generatedColumn",null),lastColumn:Te.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};Qg.SourceMapConsumer=tr;function sn(t,e){var r=t;typeof t=="string"&&(r=Te.parseSourceMapInput(t));var n=Te.getArg(r,"version"),i=Te.getArg(r,"sources"),s=Te.getArg(r,"names",[]),o=Te.getArg(r,"sourceRoot",null),a=Te.getArg(r,"sourcesContent",null),c=Te.getArg(r,"mappings"),u=Te.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=Te.normalize(o)),i=i.map(String).map(Te.normalize).map(function(l){return o&&Te.isAbsolute(o)&&Te.isAbsolute(l)?Te.relative(o,l):l}),this._names=$l.fromArray(s.map(String),!0),this._sources=$l.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(l){return Te.computeSourceURL(o,l,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=u}sn.prototype=Object.create(tr.prototype);sn.prototype.consumer=tr;sn.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=Te.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};sn.fromSourceMap=function(e,r){var n=Object.create(sn.prototype),i=n._names=$l.fromArray(e._names.toArray(),!0),s=n._sources=$l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return Te.computeSourceURL(n.sourceRoot,m,r)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,l=o.length;u<l;u++){var p=o[u],d=new MB;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=s.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return vf(n.__originalMappings,Te.compareByOriginalPositions),n};sn.prototype._version=3;Object.defineProperty(sn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function MB(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var SE=Te.compareByGeneratedPositionsDeflatedNoLine;function BB(t,e){let r=t.length,n=t.length-e;if(!(n<=1))if(n==2){let i=t[e],s=t[e+1];SE(i,s)>0&&(t[e]=s,t[e+1]=i)}else if(n<20)for(let i=e;i<r;i++)for(let s=i;s>e;s--){let o=t[s-1],a=t[s];if(SE(o,a)<=0)break;t[s-1]=a,t[s]=o}else vf(t,SE,e)}sn.prototype._parseMappings=function(e,r){var n=1,i=0,s=0,o=0,a=0,c=0,u=e.length,l=0,p={},d={},m=[],f=[],g,y,v,D,E;let x=0;for(;l<u;)if(e.charAt(l)===";")n++,l++,i=0,BB(f,x),x=f.length;else if(e.charAt(l)===",")l++;else{for(g=new MB,g.generatedLine=n,D=l;D<u&&!this._charIsMappingSeparator(e,D);D++);for(y=e.slice(l,D),v=[];l<D;)Hae.decode(e,l,d),E=d.value,l=d.rest,v.push(E);if(v.length===2)throw new Error("Found a source, but no line and column");if(v.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=i+v[0],i=g.generatedColumn,v.length>1&&(g.source=a+v[1],a+=v[1],g.originalLine=s+v[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+v[3],o=g.originalColumn,v.length>4&&(g.name=c+v[4],c+=v[4])),f.push(g),typeof g.originalLine=="number"){let C=g.source;for(;m.length<=C;)m.push(null);m[C]===null&&(m[C]=[]),m[C].push(g)}}BB(f,x),this.__generatedMappings=f;for(var b=0;b<m.length;b++)m[b]!=null&&vf(m[b],Te.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...m)};sn.prototype._findMapping=function(e,r,n,i,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return TE.search(e,r,s,o)};sn.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};sn.prototype.originalPositionFor=function(e){var r={generatedLine:Te.getArg(e,"line"),generatedColumn:Te.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",Te.compareByGeneratedPositionsDeflated,Te.getArg(e,"bias",tr.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=Te.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=Te.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=Te.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:Te.getArg(i,"originalLine",null),column:Te.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};sn.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};sn.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=Te.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=Te.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};sn.prototype.generatedPositionFor=function(e){var r=Te.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:Te.getArg(e,"line"),originalColumn:Te.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",Te.compareByOriginalPositions,Te.getArg(e,"bias",tr.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:Te.getArg(s,"generatedLine",null),column:Te.getArg(s,"generatedColumn",null),lastColumn:Te.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Qg.BasicSourceMapConsumer=sn;function Es(t,e){var r=t;typeof t=="string"&&(r=Te.parseSourceMapInput(t));var n=Te.getArg(r,"version"),i=Te.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new $l,this._names=new $l;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=Te.getArg(o,"offset"),c=Te.getArg(a,"line"),u=Te.getArg(a,"column");if(c<s.line||c===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new tr(Te.getArg(o,"map"),e)}})}Es.prototype=Object.create(tr.prototype);Es.prototype.constructor=tr;Es.prototype._version=3;Object.defineProperty(Es.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});Es.prototype.originalPositionFor=function(e){var r={generatedLine:Te.getArg(e,"line"),generatedColumn:Te.getArg(e,"column")},n=TE.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Es.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Es.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Es.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(Te.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Es.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c!==null&&(c=Te.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var l={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),typeof l.originalLine=="number"&&this.__originalMappings.push(l)}vf(this.__generatedMappings,Te.compareByGeneratedPositionsDeflated),vf(this.__originalMappings,Te.compareByOriginalPositions)};Qg.IndexedSourceMapConsumer=Es});var jB=S($B=>{h();var Kae=CE().SourceMapGenerator,Zg=Ll(),Wae=/(\r?\n)/,Jae=10,jl="$$$isSourceNode$$$";function bi(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[jl]=!0,n!=null&&this.add(n)}bi.fromStringWithSourceMap=function(e,r,n){var i=new bi,s=e.split(Wae),o=0,a=function(){var d=f(),m=f()||"";return d+m;function f(){return o<s.length?s[o++]:void 0}},c=1,u=0,l=null;return r.eachMapping(function(d){if(l!==null)if(c<d.generatedLine)p(l,a()),c++,u=0;else{var m=s[o]||"",f=m.substr(0,d.generatedColumn-u);s[o]=m.substr(d.generatedColumn-u),u=d.generatedColumn,p(l,f),l=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(u<d.generatedColumn){var m=s[o]||"";i.add(m.substr(0,d.generatedColumn)),s[o]=m.substr(d.generatedColumn),u=d.generatedColumn}l=d},this),o<s.length&&(l&&p(l,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=Zg.join(n,d)),i.setSourceContent(d,m))}),i;function p(d,m){if(d===null||d.source===void 0)i.add(m);else{var f=n?Zg.join(n,d.source):d.source;i.add(new bi(d.originalLine,d.originalColumn,f,m,d.name))}}};bi.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[jl]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};bi.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[jl]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};bi.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[jl]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};bi.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};bi.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[jl]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};bi.prototype.setSourceContent=function(e,r){this.sourceContents[Zg.toSetString(e)]=r};bi.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][jl]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Zg.fromSetString(i[r]),this.sourceContents[i[r]])};bi.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};bi.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new Kae(e),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(u,l){r.code+=u,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||c!==l.name)&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,c=l.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===Jae?(r.line++,r.column=0,p+1===d?(s=null,i=!1):i&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(u,l){n.setSourceContent(u,l)}),{code:r.code,map:n}};$B.SourceNode=bi});var UB=S(ey=>{h();ey.SourceMapGenerator=CE().SourceMapGenerator;ey.SourceMapConsumer=LB().SourceMapConsumer;ey.SourceNode=jB().SourceNode});var vM=S(Af=>{"use strict";h();Object.defineProperty(Af,"__esModule",{value:!0});function Yae(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}var ro=class{constructor(e,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=r,this.index=n}},Vl=class{constructor(e,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=r}};function Rn(t,e){let{line:r,column:n,index:i}=t;return new ro(r,n+e,i+e)}var qB="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Xae={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:qB},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:qB}},zB={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},ny=t=>t.type==="UpdateExpression"?zB.UpdateExpression[`${t.prefix}`]:zB[t.type],Qae={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:t})=>`'import.${t}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
1110
1110
|
- Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${t==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:t})=>`Unsyntactic ${t==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:t})=>`A string literal cannot be used as an imported binding.
|
|
1111
1111
|
- Did you mean \`import { "${t}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:t})=>`\`import()\` requires exactly ${t===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${ny(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${ny(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${ny(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:t})=>`Label '${t}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:t})=>`Unexpected keyword '${t}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:t})=>`Identifier '${t}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Zae={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},ece=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),tce={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${ny({type:t})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},rce=["message"];function GB(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:r})}function nce({toMessage:t,code:e,reasonCode:r,syntaxPlugin:n}){let i=r==="MissingPlugin"||r==="MissingOneOfPlugins";{let s={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};s[r]&&(r=s[r])}return function s(o,a){let c=new SyntaxError;return c.code=e,c.reasonCode=r,c.loc=o,c.pos=o.index,c.syntaxPlugin=n,i&&(c.missingPlugin=a.missingPlugin),GB(c,"clone",function(l={}){var p;let{line:d,column:m,index:f}=(p=l.loc)!=null?p:o;return s(new ro(d,m,f),Object.assign({},a,l.details))}),GB(c,"details",a),Object.defineProperty(c,"message",{configurable:!0,get(){let u=`${t(a)} (${o.line}:${o.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),c}}function Vo(t,e){if(Array.isArray(t))return n=>Vo(n,t[0]);let r={};for(let n of Object.keys(t)){let i=t[n],s=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:o}=s,a=Yae(s,rce),c=typeof o=="string"?()=>o:o;r[n]=nce(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:c},e?{syntaxPlugin:e}:{},a))}return r}var B=Object.assign({},Vo(Xae),Vo(Qae),Vo(Zae),Vo`pipelineOperator`(tce)),{defineProperty:ice}=Object,VB=(t,e)=>{t&&ice(t,e,{enumerable:!1,value:t[e]})};function bf(t){return VB(t.loc.start,"index"),VB(t.loc.end,"index"),t}var sce=t=>class extends t{parse(){let r=bf(super.parse());return this.options.tokens&&(r.tokens=r.tokens.map(bf)),r}parseRegExpLiteral({pattern:r,flags:n}){let i=null;try{i=new RegExp(r,n)}catch{}let s=this.estreeParseLiteral(i);return s.regex={pattern:r,flags:n},s}parseBigIntLiteral(r){let n;try{n=BigInt(r)}catch{n=null}let i=this.estreeParseLiteral(n);return i.bigint=String(i.value||r),i}parseDecimalLiteral(r){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||r),i}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}directiveToStmt(r){let n=r.value;delete r.value,n.type="Literal",n.raw=n.extra.raw,n.value=n.extra.expressionValue;let i=r;return i.type="ExpressionStatement",i.expression=n,i.directive=n.extra.rawValue,delete n.extra,i}initFunction(r,n){super.initFunction(r,n),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var n;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((n=r.expression.extra)!=null&&n.parenthesized)}parseBlockBody(r,n,i,s,o){super.parseBlockBody(r,n,i,s,o);let a=r.directives.map(c=>this.directiveToStmt(c));r.body=a.concat(r.body),delete r.directives}pushClassMethod(r,n,i,s,o,a){this.parseMethod(n,i,s,o,a,"ClassMethod",!0),n.typeParameters&&(n.value.typeParameters=n.typeParameters,delete n.typeParameters),r.body.push(n)}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let n=super.getPrivateNameSV(r);return r=r,delete r.id,r.name=n,r.type="PrivateIdentifier",r}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,n){let i=super.parseLiteral(r,n);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(r,n,i=!1){super.parseFunctionBody(r,n,i),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,n,i,s,o,a,c=!1){let u=this.startNode();return u.kind=r.kind,u=super.parseMethod(u,n,i,s,o,a,c),u.type="FunctionExpression",delete u.kind,r.value=u,a==="ClassPrivateMethod"&&(r.computed=!1),this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let n=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition"),n}parseClassPrivateProperty(...r){let n=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition",n.computed=!1),n}parseObjectMethod(r,n,i,s,o){let a=super.parseObjectMethod(r,n,i,s,o);return a&&(a.type="Property",a.kind==="method"&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(r,n,i,s){let o=super.parseObjectProperty(r,n,i,s);return o&&(o.kind="init",o.type="Property"),o}isValidLVal(r,n,i){return r==="Property"?"value":super.isValidLVal(r,n,i)}isAssignable(r,n){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,n):super.isAssignable(r,n)}toAssignable(r,n=!1){if(r!=null&&this.isObjectProperty(r)){let{key:i,value:s}=r;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(s,n)}else super.toAssignable(r,n)}toAssignableObjectExpressionProp(r,n,i){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(B.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(B.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,n,i)}finishCallExpression(r,n){let i=super.finishCallExpression(r,n);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var s,o;i.options=(s=i.arguments[1])!=null?s:null,i.attributes=(o=i.arguments[1])!=null?o:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,n){let i=this.state.lastTokStartLoc,s=super.parseExport(r,n);switch(s.type){case"ExportAllDeclaration":s.exported=null;break;case"ExportNamedDeclaration":s.specifiers.length===1&&s.specifiers[0].type==="ExportNamespaceSpecifier"&&(s.type="ExportAllDeclaration",s.exported=s.specifiers[0].exported,delete s.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=s;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===s.start&&this.resetStartLocation(s,i)}break}return s}parseSubscript(r,n,i,s){let o=super.parseSubscript(r,n,i,s);if(s.optionalChainMember){if((o.type==="OptionalMemberExpression"||o.type==="OptionalCallExpression")&&(o.type=o.type.substring(8)),s.stop){let a=this.startNodeAtNode(o);return a.expression=o,this.finishNode(a,"ChainExpression")}}else(o.type==="MemberExpression"||o.type==="CallExpression")&&(o.optional=!1);return o}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}finishNodeAt(r,n,i){return bf(super.finishNodeAt(r,n,i))}resetStartLocation(r,n){super.resetStartLocation(r,n),bf(r)}resetEndLocation(r,n=this.state.lastTokEndLoc){super.resetEndLocation(r,n),bf(r)}},jc=class{constructor(e,r){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!r}},Mt={brace:new jc("{"),j_oTag:new jc("<tag"),j_cTag:new jc("</tag"),j_expr:new jc("<tag>...</tag>",!0)};Mt.template=new jc("`",!0);var nt=!0,he=!0,PE=!0,xf=!0,Pa=!0,oce=!0,oy=class{constructor(e,r={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},ZE=new Map;function mt(t,e={}){e.keyword=t;let r=Ne(t,e);return ZE.set(t,r),r}function Nn(t,e){return Ne(t,{beforeExpr:nt,binop:e})}var wf=-1,zo=[],eC=[],tC=[],rC=[],nC=[],iC=[];function Ne(t,e={}){var r,n,i,s;return++wf,eC.push(t),tC.push((r=e.binop)!=null?r:-1),rC.push((n=e.beforeExpr)!=null?n:!1),nC.push((i=e.startsExpr)!=null?i:!1),iC.push((s=e.prefix)!=null?s:!1),zo.push(new oy(t,e)),wf}function rt(t,e={}){var r,n,i,s;return++wf,ZE.set(t,wf),eC.push(t),tC.push((r=e.binop)!=null?r:-1),rC.push((n=e.beforeExpr)!=null?n:!1),nC.push((i=e.startsExpr)!=null?i:!1),iC.push((s=e.prefix)!=null?s:!1),zo.push(new oy("name",e)),wf}var ace={bracketL:Ne("[",{beforeExpr:nt,startsExpr:he}),bracketHashL:Ne("#[",{beforeExpr:nt,startsExpr:he}),bracketBarL:Ne("[|",{beforeExpr:nt,startsExpr:he}),bracketR:Ne("]"),bracketBarR:Ne("|]"),braceL:Ne("{",{beforeExpr:nt,startsExpr:he}),braceBarL:Ne("{|",{beforeExpr:nt,startsExpr:he}),braceHashL:Ne("#{",{beforeExpr:nt,startsExpr:he}),braceR:Ne("}"),braceBarR:Ne("|}"),parenL:Ne("(",{beforeExpr:nt,startsExpr:he}),parenR:Ne(")"),comma:Ne(",",{beforeExpr:nt}),semi:Ne(";",{beforeExpr:nt}),colon:Ne(":",{beforeExpr:nt}),doubleColon:Ne("::",{beforeExpr:nt}),dot:Ne("."),question:Ne("?",{beforeExpr:nt}),questionDot:Ne("?."),arrow:Ne("=>",{beforeExpr:nt}),template:Ne("template"),ellipsis:Ne("...",{beforeExpr:nt}),backQuote:Ne("`",{startsExpr:he}),dollarBraceL:Ne("${",{beforeExpr:nt,startsExpr:he}),templateTail:Ne("...`",{startsExpr:he}),templateNonTail:Ne("...${",{beforeExpr:nt,startsExpr:he}),at:Ne("@"),hash:Ne("#",{startsExpr:he}),interpreterDirective:Ne("#!..."),eq:Ne("=",{beforeExpr:nt,isAssign:xf}),assign:Ne("_=",{beforeExpr:nt,isAssign:xf}),slashAssign:Ne("_=",{beforeExpr:nt,isAssign:xf}),xorAssign:Ne("_=",{beforeExpr:nt,isAssign:xf}),moduloAssign:Ne("_=",{beforeExpr:nt,isAssign:xf}),incDec:Ne("++/--",{prefix:Pa,postfix:oce,startsExpr:he}),bang:Ne("!",{beforeExpr:nt,prefix:Pa,startsExpr:he}),tilde:Ne("~",{beforeExpr:nt,prefix:Pa,startsExpr:he}),doubleCaret:Ne("^^",{startsExpr:he}),doubleAt:Ne("@@",{startsExpr:he}),pipeline:Nn("|>",0),nullishCoalescing:Nn("??",1),logicalOR:Nn("||",1),logicalAND:Nn("&&",2),bitwiseOR:Nn("|",3),bitwiseXOR:Nn("^",4),bitwiseAND:Nn("&",5),equality:Nn("==/!=/===/!==",6),lt:Nn("</>/<=/>=",7),gt:Nn("</>/<=/>=",7),relational:Nn("</>/<=/>=",7),bitShift:Nn("<</>>/>>>",8),bitShiftL:Nn("<</>>/>>>",8),bitShiftR:Nn("<</>>/>>>",8),plusMin:Ne("+/-",{beforeExpr:nt,binop:9,prefix:Pa,startsExpr:he}),modulo:Ne("%",{binop:10,startsExpr:he}),star:Ne("*",{binop:10}),slash:Nn("/",10),exponent:Ne("**",{beforeExpr:nt,binop:11,rightAssociative:!0}),_in:mt("in",{beforeExpr:nt,binop:7}),_instanceof:mt("instanceof",{beforeExpr:nt,binop:7}),_break:mt("break"),_case:mt("case",{beforeExpr:nt}),_catch:mt("catch"),_continue:mt("continue"),_debugger:mt("debugger"),_default:mt("default",{beforeExpr:nt}),_else:mt("else",{beforeExpr:nt}),_finally:mt("finally"),_function:mt("function",{startsExpr:he}),_if:mt("if"),_return:mt("return",{beforeExpr:nt}),_switch:mt("switch"),_throw:mt("throw",{beforeExpr:nt,prefix:Pa,startsExpr:he}),_try:mt("try"),_var:mt("var"),_const:mt("const"),_with:mt("with"),_new:mt("new",{beforeExpr:nt,startsExpr:he}),_this:mt("this",{startsExpr:he}),_super:mt("super",{startsExpr:he}),_class:mt("class",{startsExpr:he}),_extends:mt("extends",{beforeExpr:nt}),_export:mt("export"),_import:mt("import",{startsExpr:he}),_null:mt("null",{startsExpr:he}),_true:mt("true",{startsExpr:he}),_false:mt("false",{startsExpr:he}),_typeof:mt("typeof",{beforeExpr:nt,prefix:Pa,startsExpr:he}),_void:mt("void",{beforeExpr:nt,prefix:Pa,startsExpr:he}),_delete:mt("delete",{beforeExpr:nt,prefix:Pa,startsExpr:he}),_do:mt("do",{isLoop:PE,beforeExpr:nt}),_for:mt("for",{isLoop:PE}),_while:mt("while",{isLoop:PE}),_as:rt("as",{startsExpr:he}),_assert:rt("assert",{startsExpr:he}),_async:rt("async",{startsExpr:he}),_await:rt("await",{startsExpr:he}),_defer:rt("defer",{startsExpr:he}),_from:rt("from",{startsExpr:he}),_get:rt("get",{startsExpr:he}),_let:rt("let",{startsExpr:he}),_meta:rt("meta",{startsExpr:he}),_of:rt("of",{startsExpr:he}),_sent:rt("sent",{startsExpr:he}),_set:rt("set",{startsExpr:he}),_source:rt("source",{startsExpr:he}),_static:rt("static",{startsExpr:he}),_using:rt("using",{startsExpr:he}),_yield:rt("yield",{startsExpr:he}),_asserts:rt("asserts",{startsExpr:he}),_checks:rt("checks",{startsExpr:he}),_exports:rt("exports",{startsExpr:he}),_global:rt("global",{startsExpr:he}),_implements:rt("implements",{startsExpr:he}),_intrinsic:rt("intrinsic",{startsExpr:he}),_infer:rt("infer",{startsExpr:he}),_is:rt("is",{startsExpr:he}),_mixins:rt("mixins",{startsExpr:he}),_proto:rt("proto",{startsExpr:he}),_require:rt("require",{startsExpr:he}),_satisfies:rt("satisfies",{startsExpr:he}),_keyof:rt("keyof",{startsExpr:he}),_readonly:rt("readonly",{startsExpr:he}),_unique:rt("unique",{startsExpr:he}),_abstract:rt("abstract",{startsExpr:he}),_declare:rt("declare",{startsExpr:he}),_enum:rt("enum",{startsExpr:he}),_module:rt("module",{startsExpr:he}),_namespace:rt("namespace",{startsExpr:he}),_interface:rt("interface",{startsExpr:he}),_type:rt("type",{startsExpr:he}),_opaque:rt("opaque",{startsExpr:he}),name:Ne("name",{startsExpr:he}),string:Ne("string",{startsExpr:he}),num:Ne("num",{startsExpr:he}),bigint:Ne("bigint",{startsExpr:he}),decimal:Ne("decimal",{startsExpr:he}),regexp:Ne("regexp",{startsExpr:he}),privateName:Ne("#name",{startsExpr:he}),eof:Ne("eof"),jsxName:Ne("jsxName"),jsxText:Ne("jsxText",{beforeExpr:!0}),jsxTagStart:Ne("jsxTagStart",{startsExpr:!0}),jsxTagEnd:Ne("jsxTagEnd"),placeholder:Ne("%%",{startsExpr:!0})};function Ct(t){return t>=93&&t<=132}function cce(t){return t<=92}function Cs(t){return t>=58&&t<=132}function nM(t){return t>=58&&t<=136}function uce(t){return rC[t]}function NE(t){return nC[t]}function lce(t){return t>=29&&t<=33}function HB(t){return t>=129&&t<=131}function pce(t){return t>=90&&t<=92}function sC(t){return t>=58&&t<=92}function dce(t){return t>=39&&t<=59}function fce(t){return t===34}function mce(t){return iC[t]}function hce(t){return t>=121&&t<=123}function gce(t){return t>=124&&t<=130}function _a(t){return eC[t]}function iy(t){return tC[t]}function yce(t){return t===57}function ay(t){return t>=24&&t<=25}function qo(t){return zo[t]}zo[8].updateContext=t=>{t.pop()},zo[5].updateContext=zo[7].updateContext=zo[23].updateContext=t=>{t.push(Mt.brace)},zo[22].updateContext=t=>{t[t.length-1]===Mt.template?t.pop():t.push(Mt.template)},zo[142].updateContext=t=>{t.push(Mt.j_expr,Mt.j_oTag)};var oC="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",iM="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",vce=new RegExp("["+oC+"]"),bce=new RegExp("["+oC+iM+"]");oC=iM=null;var sM=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],xce=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function RE(t,e){let r=65536;for(let n=0,i=e.length;n<i;n+=2){if(r+=e[n],r>t)return!1;if(r+=e[n+1],r>=t)return!0}return!1}function Go(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&vce.test(String.fromCharCode(t)):RE(t,sM)}function ql(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&bce.test(String.fromCharCode(t)):RE(t,sM)||RE(t,xce)}var aC={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Dce=new Set(aC.keyword),Ece=new Set(aC.strict),Cce=new Set(aC.strictBind);function oM(t,e){return e&&t==="await"||t==="enum"}function aM(t,e){return oM(t,e)||Ece.has(t)}function cM(t){return Cce.has(t)}function uM(t,e){return aM(t,e)||cM(t)}function wce(t){return Dce.has(t)}function Sce(t,e,r){return t===64&&e===64&&Go(r)}var Tce=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Pce(t){return Tce.has(t)}var Sf=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}},Tf=class{constructor(e,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&128)return!0;if(r&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Sf(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,r,n){let i=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(i,e,r,n);let s=i.names.get(e)||0;r&16?s=s|4:(i.firstLexicalName||(i.firstLexicalName=e),s=s|2),i.names.set(e,s),r&8&&this.maybeExportDefined(i,e)}else if(r&4)for(let s=this.scopeStack.length-1;s>=0&&(i=this.scopeStack[s],this.checkRedeclarationInScope(i,e,r,n),i.names.set(e,(i.names.get(e)||0)|1),this.maybeExportDefined(i,e),!(i.flags&387));--s);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,r){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(e,r,n,i){this.isRedeclaredInScope(e,r,n)&&this.parser.raise(B.VarRedeclaration,i,{identifierName:r})}isRedeclaredInScope(e,r,n){if(!(n&1))return!1;if(n&8)return e.names.has(r);let i=e.names.get(r);return n&16?(i&2)>0||!this.treatFunctionsAsVarInScope(e)&&(i&1)>0:(i&2)>0&&!(e.flags&8&&e.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(e)&&(i&4)>0}checkLocalExport(e){let{name:r}=e;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&387)return r}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&451&&!(r&4))return r}}},OE=class extends Sf{constructor(...e){super(...e),this.declareFunctions=new Set}},BE=class extends Tf{createScope(e){return new OE(e)}declareName(e,r,n){let i=this.currentScope();if(r&2048){this.checkRedeclarationInScope(i,e,r,n),this.maybeExportDefined(i,e),i.declareFunctions.add(e);return}super.declareName(e,r,n)}isRedeclaredInScope(e,r,n){if(super.isRedeclaredInScope(e,r,n))return!0;if(n&2048&&!e.declareFunctions.has(r)){let i=e.names.get(r);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},ME=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[r,n]=e;if(!this.hasPlugin(r))return!1;let i=this.plugins.get(r);for(let s of Object.keys(n))if(i?.[s]!==n[s])return!1;return!0}}getPluginOption(e,r){var n;return(n=this.plugins.get(e))==null?void 0:n[r]}};function lM(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function Ace(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function Pf(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function Df(t,e,r){let n=null,i=e.length;for(;n===null&&i>0;)n=e[--i];n===null||n.start>r.start?Pf(t,r.comments):lM(n,r.comments)}var LE=class extends ME{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let i=n-1,s=r[i];s.start===e.end&&(s.leadingNode=e,i--);let{start:o}=e;for(;i>=0;i--){let a=r[i],c=a.end;if(c>o)a.containingNode=e,this.finalizeComment(a),r.splice(i,1);else{c===o&&(a.trailingNode=e);break}}}finalizeComment(e){let{comments:r}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&lM(e.leadingNode,r),e.trailingNode!==null&&Ace(e.trailingNode,r);else{let{containingNode:n,start:i}=e;if(this.input.charCodeAt(i-1)===44)switch(n.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Df(n,n.properties,e);break;case"CallExpression":case"OptionalCallExpression":Df(n,n.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Df(n,n.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Df(n,n.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Df(n,n.specifiers,e);break;default:Pf(n,r)}else Pf(n,r)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let r=e.length-1;r>=0;r--)this.finalizeComment(e[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:r}=this.state,{length:n}=r;if(n===0)return;let i=r[n-1];i.leadingNode===e&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){let{commentStack:r}=this.state,{length:n}=r;n!==0&&(r[n-1].trailingNode===e?r[n-1].trailingNode=null:n>=2&&r[n-2].trailingNode===e&&(r[n-2].trailingNode=null))}takeSurroundingComments(e,r,n){let{commentStack:i}=this.state,s=i.length;if(s===0)return;let o=s-1;for(;o>=0;o--){let a=i[o],c=a.end;if(a.start===n)a.leadingNode=e;else if(c===r)a.trailingNode=e;else if(c<r)break}}},_ce=/\r\n|[\r\n\u2028\u2029]/,ty=new RegExp(_ce.source,"g");function zl(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function KB(t,e,r){for(let n=e;n<r;n++)if(zl(t.charCodeAt(n)))return!0;return!1}var AE=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,_E=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Fce(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var $E=class t{constructor(){this.flags=1024,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[Mt.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:r,startLine:n,startColumn:i}){this.strict=e===!1?!1:e===!0?!0:r==="module",this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new ro(n,i,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new ro(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let e=new t;return e.flags=this.flags,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},kce=function(e){return e>=48&&e<=57},WB={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},ry={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function JB(t,e,r,n,i,s){let o=r,a=n,c=i,u="",l=null,p=r,{length:d}=e;for(;;){if(r>=d){s.unterminated(o,a,c),u+=e.slice(p,r);break}let m=e.charCodeAt(r);if(Ice(t,m,e,r)){u+=e.slice(p,r);break}if(m===92){u+=e.slice(p,r);let f=Nce(e,r,n,i,t==="template",s);f.ch===null&&!l?l={pos:r,lineStart:n,curLine:i}:u+=f.ch,{pos:r,lineStart:n,curLine:i}=f,p=r}else m===8232||m===8233?(++r,++i,n=r):m===10||m===13?t==="template"?(u+=e.slice(p,r)+`
|
|
1112
1112
|
`,++r,m===13&&e.charCodeAt(r)===10&&++r,++i,p=n=r):s.unterminated(o,a,c):++r}return{pos:r,str:u,firstInvalidLoc:l,lineStart:n,curLine:i,containsInvalid:!!l}}function Ice(t,e,r,n){return t==="template"?e===96||e===36&&r.charCodeAt(n+1)===123:e===(t==="double"?34:39)}function Nce(t,e,r,n,i,s){let o=!i;e++;let a=u=>({pos:e,ch:u,lineStart:r,curLine:n}),c=t.charCodeAt(e++);switch(c){case 110:return a(`
|
|
1113
1113
|
`);case 114:return a("\r");case 120:{let u;return{code:u,pos:e}=jE(t,e,r,n,2,!1,o,s),a(u===null?null:String.fromCharCode(u))}case 117:{let u;return{code:u,pos:e}=dM(t,e,r,n,o,s),a(u===null?null:String.fromCodePoint(u))}case 116:return a(" ");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:r=e,++n;case 8232:case 8233:return a("");case 56:case 57:if(i)return a(null);s.strictNumericEscape(e-1,r,n);default:if(c>=48&&c<=55){let u=e-1,p=/^[0-7]+/.exec(t.slice(u,e+2))[0],d=parseInt(p,8);d>255&&(p=p.slice(0,-1),d=parseInt(p,8)),e+=p.length-1;let m=t.charCodeAt(e);if(p!=="0"||m===56||m===57){if(i)return a(null);s.strictNumericEscape(u,r,n)}return a(String.fromCharCode(d))}return a(String.fromCharCode(c))}}function jE(t,e,r,n,i,s,o,a){let c=e,u;return{n:u,pos:e}=pM(t,e,r,n,16,i,s,!1,a,!o),u===null&&(o?a.invalidEscapeSequence(c,r,n):e=c-1),{code:u,pos:e}}function pM(t,e,r,n,i,s,o,a,c,u){let l=e,p=i===16?WB.hex:WB.decBinOct,d=i===16?ry.hex:i===10?ry.dec:i===8?ry.oct:ry.bin,m=!1,f=0;for(let g=0,y=s??1/0;g<y;++g){let v=t.charCodeAt(e),D;if(v===95&&a!=="bail"){let E=t.charCodeAt(e-1),x=t.charCodeAt(e+1);if(a){if(Number.isNaN(x)||!d(x)||p.has(E)||p.has(x)){if(u)return{n:null,pos:e};c.unexpectedNumericSeparator(e,r,n)}}else{if(u)return{n:null,pos:e};c.numericSeparatorInEscapeSequence(e,r,n)}++e;continue}if(v>=97?D=v-97+10:v>=65?D=v-65+10:kce(v)?D=v-48:D=1/0,D>=i){if(D<=9&&u)return{n:null,pos:e};if(D<=9&&c.invalidDigit(e,r,n,i))D=0;else if(o)D=0,m=!0;else break}++e,f=f*i+D}return e===l||s!=null&&e-l!==s||m?{n:null,pos:e}:{n:f,pos:e}}function dM(t,e,r,n,i,s){let o=t.charCodeAt(e),a;if(o===123){if(++e,{code:a,pos:e}=jE(t,e,r,n,t.indexOf("}",e)-e,!0,i,s),++e,a!==null&&a>1114111)if(i)s.invalidCodePoint(e,r,n);else return{code:null,pos:e}}else({code:a,pos:e}=jE(t,e,r,n,4,!1,i,s));return{code:a,pos:e}}function Ef(t,e,r){return new ro(r,t-e,t)}var Rce=new Set([103,109,115,105,121,117,100,118]),to=class{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new Vl(e.startLoc,e.endLoc)}},UE=class extends LE{constructor(e,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(n,i,s,o)=>this.options.errorRecovery?(this.raise(B.InvalidDigit,Ef(n,i,s),{radix:o}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(B.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(B.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(B.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(B.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(n,i,s)=>{this.recordStrictModeErrors(B.StrictNumericEscape,Ef(n,i,s))},unterminated:(n,i,s)=>{throw this.raise(B.UnterminatedString,Ef(n-1,i,s))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(B.StrictNumericEscape),unterminated:(n,i,s)=>{throw this.raise(B.UnterminatedTemplate,Ef(n,i,s))}}),this.state=new $E,this.state.init(e),this.input=r,this.length=r.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new to(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let r=this.state;return this.state=e,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return AE.lastIndex=e,AE.test(this.input)?AE.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return _E.lastIndex=e,_E.test(this.input)?_E.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let r=this.input.charCodeAt(e);if((r&64512)===55296&&++e<this.input.length){let n=this.input.charCodeAt(e);(n&64512)===56320&&(r=65536+((r&1023)<<10)+(n&1023))}return r}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([r,n])=>this.raise(r,n)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let r;this.isLookahead||(r=this.state.curPosition());let n=this.state.pos,i=this.input.indexOf(e,n+2);if(i===-1)throw this.raise(B.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,ty.lastIndex=n+2;ty.test(this.input)&&ty.lastIndex<=i;)++this.state.curLine,this.state.lineStart=ty.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(n+2,i),start:n,end:i+e.length,loc:new Vl(r,this.state.curPosition())};return this.options.tokens&&this.pushToken(s),s}skipLineComment(e){let r=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!zl(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,a={type:"CommentLine",value:this.input.slice(r+e,s),start:r,end:s,loc:new Vl(n,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let e=this.state.pos,r=[];e:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let i=this.skipBlockComment("*/");i!==void 0&&(this.addComment(i),this.options.attachComment&&r.push(i));break}case 47:{let i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),this.options.attachComment&&r.push(i));break}default:break e}break;default:if(Fce(n))++this.state.pos;else if(n===45&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===45&&this.input.charCodeAt(i+2)===62&&(e===0||this.state.lineStart>e)){let s=this.skipLineComment(3);s!==void 0&&(this.addComment(s),this.options.attachComment&&r.push(s))}else break e}else if(n===60&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let s=this.skipLineComment(4);s!==void 0&&(this.addComment(s),this.options.attachComment&&r.push(s))}else break e}else break e}}if(r.length>0){let n=this.state.pos,i={start:e,end:n,comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(e,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=e,this.state.value=r,this.isLookahead||this.updateContext(n)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,r=this.codePointAtPos(e);if(r>=48&&r<=57)throw this.raise(B.UnexpectedDigitAfterHash,this.state.curPosition());if(r===123||r===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(r===123?B.RecordExpressionHashIncorrectStartSyntaxType:B.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,r===123?this.finishToken(7):this.finishToken(1)}else Go(r)?(++this.state.pos,this.finishToken(138,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let r=this.state.pos;for(this.state.pos+=1;!zl(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let n=this.input.slice(r+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(e){let r=e===42?55:54,n=1,i=this.input.charCodeAt(this.state.pos+1);e===42&&i===42&&(n++,i=this.input.charCodeAt(this.state.pos+2),r=57),i===61&&!this.state.inType&&(n++,r=e===37?33:30),this.finishOp(r,n)}readToken_pipe_amp(e){let r=this.input.charCodeAt(this.state.pos+1);if(r===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);return}if(e===124){if(r===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&r===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(B.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&r===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(B.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(r===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let r=this.input.charCodeAt(this.state.pos+1);if(r===e){this.finishOp(34,2);return}r===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:e}=this.state,r=this.input.charCodeAt(e+1);if(r===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(r===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:e}=this.state,r=this.input.charCodeAt(e+1);if(r===62){let n=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+n)===61){this.finishOp(30,n+1);return}this.finishOp(52,n);return}if(r===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){let r=this.input.charCodeAt(this.state.pos+1);if(r===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&r===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),r=this.input.charCodeAt(this.state.pos+2);e===63?r===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(r>=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(B.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(B.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Go(e)){this.readWord(e);return}}throw this.raise(B.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,r){let n=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(e,n)}readRegexp(){let e=this.state.startLoc,r=this.state.start+1,n,i,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(B.UnterminatedRegExp,Rn(e,1));let u=this.input.charCodeAt(s);if(zl(u))throw this.raise(B.UnterminatedRegExp,Rn(e,1));if(n)n=!1;else{if(u===91)i=!0;else if(u===93&&i)i=!1;else if(u===47&&!i)break;n=u===92}}let o=this.input.slice(r,s);++s;let a="",c=()=>Rn(e,s+2-r);for(;s<this.length;){let u=this.codePointAtPos(s),l=String.fromCharCode(u);if(Rce.has(u))u===118?a.includes("u")&&this.raise(B.IncompatibleRegExpUVFlags,c()):u===117&&a.includes("v")&&this.raise(B.IncompatibleRegExpUVFlags,c()),a.includes(l)&&this.raise(B.DuplicateRegExpFlags,c());else if(ql(u)||u===92)this.raise(B.MalformedRegExpFlags,c());else break;++s,a+=l}this.state.pos=s,this.finishToken(137,{pattern:o,flags:a})}readInt(e,r,n=!1,i=!0){let{n:s,pos:o}=pM(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,r,n,i,this.errorHandlers_readInt,!1);return this.state.pos=o,s}readRadixNumber(e){let r=this.state.curPosition(),n=!1;this.state.pos+=2;let i=this.readInt(e);i==null&&this.raise(B.InvalidDigit,Rn(r,2),{radix:e});let s=this.input.charCodeAt(this.state.pos);if(s===110)++this.state.pos,n=!0;else if(s===109)throw this.raise(B.InvalidDecimal,r);if(Go(this.codePointAtPos(this.state.pos)))throw this.raise(B.NumberIdentifier,this.state.curPosition());if(n){let o=this.input.slice(r.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,o);return}this.finishToken(134,i)}readNumber(e){let r=this.state.pos,n=this.state.curPosition(),i=!1,s=!1,o=!1,a=!1,c=!1;!e&&this.readInt(10)===null&&this.raise(B.InvalidNumber,this.state.curPosition());let u=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(u){let m=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(B.StrictOctalLiteral,n),!this.state.strict){let f=m.indexOf("_");f>0&&this.raise(B.ZeroDigitNumericSeparator,Rn(n,f))}c=u&&!/[89]/.test(m)}let l=this.input.charCodeAt(this.state.pos);if(l===46&&!c&&(++this.state.pos,this.readInt(10),i=!0,l=this.input.charCodeAt(this.state.pos)),(l===69||l===101)&&!c&&(l=this.input.charCodeAt(++this.state.pos),(l===43||l===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(B.InvalidOrMissingExponent,n),i=!0,a=!0,l=this.input.charCodeAt(this.state.pos)),l===110&&((i||u)&&this.raise(B.InvalidBigIntLiteral,n),++this.state.pos,s=!0),l===109&&(this.expectPlugin("decimal",this.state.curPosition()),(a||u)&&this.raise(B.InvalidDecimal,n),++this.state.pos,o=!0),Go(this.codePointAtPos(this.state.pos)))throw this.raise(B.NumberIdentifier,this.state.curPosition());let p=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(s){this.finishToken(135,p);return}if(o){this.finishToken(136,p);return}let d=c?parseInt(p,8):parseFloat(p);this.finishToken(134,d)}readCodePoint(e){let{code:r,pos:n}=dM(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=n,r}readString(e){let{str:r,pos:n,curLine:i,lineStart:s}=JB(e===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=s,this.state.curLine=i,this.finishToken(133,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:r,firstInvalidLoc:n,pos:i,curLine:s,lineStart:o}=JB("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new ro(n.curLine,n.pos-n.lineStart,n.pos)),this.input.codePointAt(i)===96?this.finishToken(24,n?null:e+r+"`"):(this.state.pos++,this.finishToken(25,n?null:e+r+"${"))}recordStrictModeErrors(e,r){let n=r.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(e,r):this.state.strictErrors.set(n,[e,r])}readWord1(e){this.state.containsEsc=!1;let r="",n=this.state.pos,i=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let s=this.codePointAtPos(this.state.pos);if(ql(s))this.state.pos+=s<=65535?1:2;else if(s===92){this.state.containsEsc=!0,r+=this.input.slice(i,this.state.pos);let o=this.state.curPosition(),a=this.state.pos===n?Go:ql;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(B.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;let c=this.readCodePoint(!0);c!==null&&(a(c)||this.raise(B.EscapedCharNotAnIdentifier,o),r+=String.fromCodePoint(c)),i=this.state.pos}else break}return r+this.input.slice(i,this.state.pos)}readWord(e){let r=this.readWord1(e),n=ZE.get(r);n!==void 0?this.finishToken(n,_a(n)):this.finishToken(132,r)}checkKeywordEscapes(){let{type:e}=this.state;sC(e)&&this.state.containsEsc&&this.raise(B.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:_a(e)})}raise(e,r,n={}){let i=r instanceof ro?r:r.loc.start,s=e(i,n);if(!this.options.errorRecovery)throw s;return this.isLookahead||this.state.errors.push(s),s}raiseOverwrite(e,r,n={}){let i=r instanceof ro?r:r.loc.start,s=i.index,o=this.state.errors;for(let a=o.length-1;a>=0;a--){let c=o[a];if(c.loc.index===s)return o[a]=e(i,n);if(c.loc.index<s)break}return this.raise(e,r,n)}updateContext(e){}unexpected(e,r){throw this.raise(B.UnexpectedToken,e??this.state.startLoc,{expected:r?_a(r):null})}expectPlugin(e,r){if(this.hasPlugin(e))return!0;throw this.raise(B.MissingPlugin,r??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(r=>this.hasPlugin(r)))throw this.raise(B.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(r,n,i)=>{this.raise(e,Ef(r,n,i))}}},qE=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},zE=class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new qE)}exit(){let e=this.stack.pop(),r=this.current();for(let[n,i]of Array.from(e.undefinedPrivateNames))r?r.undefinedPrivateNames.has(n)||r.undefinedPrivateNames.set(n,i):this.parser.raise(B.InvalidPrivateFieldResolution,i,{identifierName:n})}declarePrivateName(e,r,n){let{privateNames:i,loneAccessors:s,undefinedPrivateNames:o}=this.current(),a=i.has(e);if(r&3){let c=a&&s.get(e);if(c){let u=c&4,l=r&4,p=c&3,d=r&3;a=p===d||u!==l,a||s.delete(e)}else a||s.set(e,r)}a&&this.parser.raise(B.PrivateNameRedeclaration,n,{identifierName:e}),i.add(e),o.delete(e)}usePrivateName(e,r){let n;for(n of this.stack)if(n.privateNames.has(e))return;n?n.undefinedPrivateNames.set(e,r):this.parser.raise(B.InvalidPrivateFieldResolution,r,{identifierName:e})}},Hl=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},cy=class extends Hl{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,r){let n=r.index;this.declarationErrors.set(n,[e,r])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},GE=class{constructor(e){this.parser=void 0,this.stack=[new Hl],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,r){let n=r.loc.start,{stack:i}=this,s=i.length-1,o=i[s];for(;!o.isCertainlyParameterDeclaration();){if(o.canBeArrowParameterDeclaration())o.recordDeclarationError(e,n);else return;o=i[--s]}this.parser.raise(e,n)}recordArrowParameterBindingError(e,r){let{stack:n}=this,i=n[n.length-1],s=r.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(e,s);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(e,s);else return}recordAsyncArrowParametersError(e){let{stack:r}=this,n=r.length-1,i=r[n];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(B.AwaitBindingIdentifier,e),i=r[--n]}validateAsPattern(){let{stack:e}=this,r=e[e.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(([n,i])=>{this.parser.raise(n,i);let s=e.length-2,o=e[s];for(;o.canBeArrowParameterDeclaration();)o.clearDeclarationError(i.index),o=e[--s]})}};function Oce(){return new Hl(3)}function Bce(){return new cy(1)}function Mce(){return new cy(2)}function fM(){return new Hl}var VE=class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function sy(t,e){return(t?2:0)|(e?1:0)}var HE=class extends UE{addExtra(e,r,n,i=!0){if(!e)return;let{extra:s}=e;s==null&&(s={},e.extra=s),i?s[r]=n:Object.defineProperty(s,r,{enumerable:i,value:n})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,r){let n=e+r.length;if(this.input.slice(e,n)===r){let i=this.input.charCodeAt(n);return!(ql(i)||(i&64512)===55296)}return!1}isLookaheadContextual(e){let r=this.nextTokenStart();return this.isUnparsedContextual(r,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,r){if(!this.eatContextual(e)){if(r!=null)throw this.raise(r,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return KB(this.input,this.state.lastTokEndLoc.index,this.state.start)}hasFollowingLineBreak(){return KB(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(B.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,r){this.eat(e)||this.unexpected(r,e)}tryParse(e,r=this.state.clone()){let n={node:null};try{let i=e((s=null)=>{throw n.node=s,n});if(this.state.errors.length>r.errors.length){let s=this.state;return this.state=r,this.state.tokensLength=s.tokensLength,{node:i,error:s.errors[r.errors.length],thrown:!1,aborted:!1,failState:s}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let s=this.state;if(this.state=r,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:s};if(i===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:s};throw i}}checkExpressionErrors(e,r){if(!e)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:i,privateKeyLoc:s,optionalParametersLoc:o}=e,a=!!n||!!i||!!o||!!s;if(!r)return a;n!=null&&this.raise(B.InvalidCoverInitializedName,n),i!=null&&this.raise(B.DuplicateProto,i),s!=null&&this.raise(B.UnexpectedPrivateField,s),o!=null&&this.unexpected(o)}isLiteralPropertyName(){return nM(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){let r=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=e;let s=this.scope,o=this.getScopeHandler();this.scope=new o(this,e);let a=this.prodParam;this.prodParam=new VE;let c=this.classScope;this.classScope=new zE(this);let u=this.expressionScope;return this.expressionScope=new GE(this),()=>{this.state.labels=r,this.exportedIdentifiers=n,this.inModule=i,this.scope=s,this.prodParam=a,this.classScope=c,this.expressionScope=u}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){let{privateKeyLoc:r}=e;r!==null&&this.expectPlugin("destructuringPrivate",r)}},Gl=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},Kl=class{constructor(e,r,n){this.type="",this.start=r,this.end=0,this.loc=new Vl(n),e!=null&&e.options.ranges&&(this.range=[r,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}},cC=Kl.prototype;cC.__clone=function(){let t=new Kl(void 0,this.start,this.loc.start),e=Object.keys(this);for(let r=0,n=e.length;r<n;r++){let i=e[r];i!=="leadingComments"&&i!=="trailingComments"&&i!=="innerComments"&&(t[i]=this[i])}return t};function Lce(t){return Ho(t)}function Ho(t){let{type:e,start:r,end:n,loc:i,range:s,extra:o,name:a}=t,c=Object.create(cC);return c.type=e,c.start=r,c.end=n,c.loc=i,c.range=s,c.extra=o,c.name=a,e==="Placeholder"&&(c.expectedNode=t.expectedNode),c}function $ce(t){let{type:e,start:r,end:n,loc:i,range:s,extra:o}=t;if(e==="Placeholder")return Lce(t);let a=Object.create(cC);return a.type=e,a.start=r,a.end=n,a.loc=i,a.range=s,t.raw!==void 0?a.raw=t.raw:a.extra=o,a.value=t.value,a}var KE=class extends HE{startNode(){let e=this.state.startLoc;return new Kl(this,e.index,e)}startNodeAt(e){return new Kl(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,r){return this.finishNodeAt(e,r,this.state.lastTokEndLoc)}finishNodeAt(e,r,n){return e.type=r,e.end=n.index,e.loc.end=n,this.options.ranges&&(e.range[1]=n.index),this.options.attachComment&&this.processComment(e),e}resetStartLocation(e,r){e.start=r.index,e.loc.start=r,this.options.ranges&&(e.range[0]=r.index)}resetEndLocation(e,r=this.state.lastTokEndLoc){e.end=r.index,e.loc.end=r,this.options.ranges&&(e.range[1]=r.index)}resetStartLocationFromNode(e,r){this.resetStartLocation(e,r.loc.start)}},jce=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Oe=Vo`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:t})=>`Cannot overwrite reserved type ${t}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:r})=>`Enum \`${t}\` has type \`${r}\`, so the initializer of \`${e}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${r}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:t})=>`Unexpected reserved type ${t}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Uce(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function YB(t){return t.importKind==="type"||t.importKind==="typeof"}var qce={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function zce(t,e){let r=[],n=[];for(let i=0;i<t.length;i++)(e(t[i],i,t)?r:n).push(t[i]);return[r,n]}var Gce=/\*?\s*@((?:no)?flow)\b/,Vce=t=>class extends t{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return BE}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(r,n){r!==133&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,n)}addComment(r){if(this.flowPragma===void 0){let n=Gce.exec(r.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(r)}flowParseTypeInitialiser(r){let n=this.state.inType;this.state.inType=!0,this.expect(r||14);let i=this.flowParseType();return this.state.inType=n,i}flowParsePredicate(){let r=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(Oe.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let r=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,i=null;return this.match(54)?(this.state.inType=r,i=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=r,this.match(54)&&(i=this.flowParsePredicate())),[n,i]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();let n=r.id=this.parseIdentifier(),i=this.startNode(),s=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let o=this.flowParseFunctionTypeParams();return i.params=o.params,i.rest=o.rest,i.this=o._this,this.expect(11),[i.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),s.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(s,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,n){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(n&&this.raise(Oe.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,n);this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(133)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();let n=r.body=this.startNode(),i=n.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Oe.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(a)):(this.expectContextual(125,Oe.UnsupportedStatementInDeclareModule),a=this.flowParseDeclare(a,!0)),i.push(a)}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let s=null,o=!1;return i.forEach(a=>{Uce(a)?(s==="CommonJS"&&this.raise(Oe.AmbiguousDeclareModuleKind,a),s="ES"):a.type==="DeclareModuleExports"&&(o&&this.raise(Oe.DuplicateDeclareModuleExports,a),s==="ES"&&this.raise(Oe.AmbiguousDeclareModuleKind,a),s="CommonJS",o=!0)}),r.kind=s||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let i=this.state.value;throw this.raise(Oe.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:qce[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"&&(r.type="ExportDeclaration",r.default=!1,delete r.exportKind),r.type="Declare"+r.type,r;this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();let n=this.flowParseTypeAlias(r);return n.type="DeclareTypeAlias",n}flowParseDeclareOpaqueType(r){this.next();let n=this.flowParseOpaqueType(r,!0);return n.type="DeclareOpaqueType",n}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,n){if(r.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(r.id.name,n?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(Oe.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,n,i){jce.has(r)&&this.raise(i?Oe.AssignReservedType:Oe.UnexpectedReservedType,n,{reservedType:r})}flowParseRestrictedIdentifier(r,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifier(r)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,n){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,n||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameter(r=!1){let n=this.state.startLoc,i=this.startNode(),s=this.flowParseVariance(),o=this.flowParseTypeAnnotatableIdentifier();return i.name=o.name,i.variance=s,i.bound=o.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):r&&this.raise(Oe.MissingTypeParamDefault,n),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let r=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let i=!1;do{let s=this.flowParseTypeParameter(i);n.params.push(s),s.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(n,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let r=this.startNode(),n=this.state.inType;r.params=[],this.state.inType=!0,this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let r=this.startNode(),n=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){let r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,n,i){return r.static=n,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=i,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,n){return r.static=n,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,n){let i=this.startNode();return r.static=n,r.value=this.flowParseObjectTypeMethodish(i),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:n,allowSpread:i,allowProto:s,allowInexact:o}){let a=this.state.inType;this.state.inType=!0;let c=this.startNode();c.callProperties=[],c.properties=[],c.indexers=[],c.internalSlots=[];let u,l,p=!1;for(n&&this.match(6)?(this.expect(6),u=9,l=!0):(this.expect(5),u=8,l=!1),c.exact=l;!this.match(u);){let m=!1,f=null,g=null,y=this.startNode();if(s&&this.isContextual(118)){let D=this.lookahead();D.type!==14&&D.type!==17&&(this.next(),f=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){let D=this.lookahead();D.type!==14&&D.type!==17&&(this.next(),m=!0)}let v=this.flowParseVariance();if(this.eat(0))f!=null&&this.unexpected(f),this.eat(0)?(v&&this.unexpected(v.loc.start),c.internalSlots.push(this.flowParseObjectTypeInternalSlot(y,m))):c.indexers.push(this.flowParseObjectTypeIndexer(y,m,v));else if(this.match(10)||this.match(47))f!=null&&this.unexpected(f),v&&this.unexpected(v.loc.start),c.callProperties.push(this.flowParseObjectTypeCallProperty(y,m));else{let D="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();nM(x.type)&&(D=this.state.value,this.next())}let E=this.flowParseObjectTypeProperty(y,m,f,v,D,i,o??!l);E===null?(p=!0,g=this.state.lastTokStartLoc):c.properties.push(E)}this.flowObjectTypeSemicolon(),g&&!this.match(8)&&!this.match(9)&&this.raise(Oe.UnexpectedExplicitInexactInObject,g)}this.expect(u),i&&(c.inexact=p);let d=this.finishNode(c,"ObjectTypeAnnotation");return this.state.inType=a,d}flowParseObjectTypeProperty(r,n,i,s,o,a,c){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?c||this.raise(Oe.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Oe.InexactInsideNonObject,this.state.lastTokStartLoc),s&&this.raise(Oe.InexactVariance,s),null):(a||this.raise(Oe.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),s&&this.raise(Oe.SpreadVariance,s),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=n,r.proto=i!=null,r.kind=o;let u=!1;return this.match(47)||this.match(10)?(r.method=!0,i!=null&&this.unexpected(i),s&&this.unexpected(s.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(o==="get"||o==="set")&&this.flowCheckGetterSetterParams(r),!a&&r.key.name==="constructor"&&r.value.this&&this.raise(Oe.ThisParamBannedInConstructor,r.value.this)):(o!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(u=!0),r.value=this.flowParseTypeInitialiser(),r.variance=s),r.optional=u,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){let n=r.kind==="get"?0:1,i=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?Oe.GetterMayNotHaveThisParam:Oe.SetterMayNotHaveThisParam,r.value.this),i!==n&&this.raise(r.kind==="get"?B.BadGetterArity:B.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(B.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,n){var i;(i=r)!=null||(r=this.state.startLoc);let s=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let o=this.startNodeAt(r);o.qualification=s,o.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(o,"QualifiedTypeIdentifier")}return s}flowParseGenericType(r,n){let i=this.startNodeAt(r);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(r,n),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){let r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let n=null,i=!1,s=null,o=this.startNode(),a=this.lookahead(),c=this.state.type===78;return a.type===14||a.type===17?(c&&!r&&this.raise(Oe.ThisParamMustBeFirst,o),n=this.parseIdentifier(c),this.eat(17)&&(i=!0,c&&this.raise(Oe.ThisParamMayNotBeOptional,o)),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),o.name=n,o.optional=i,o.typeAnnotation=s,this.finishNode(o,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){let n=this.startNodeAt(r.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let n=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:r,rest:n,_this:i}}flowIdentToTypeAnnotation(r,n,i){switch(i.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(r,i)}}flowParsePrimaryType(){let r=this.state.startLoc,n=this.startNode(),i,s,o=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,s=this.flowParseTupleType(),this.state.noAnonFunctionType=a,s;case 47:{let c=this.startNode();return c.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),c.params=i.params,c.rest=i.rest,c.this=i._this,this.expect(11),this.expect(19),c.returnType=this.flowParseType(),this.finishNode(c,"FunctionTypeAnnotation")}case 10:{let c=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Ct(this.state.type)||this.match(78)){let u=this.lookahead().type;o=u!==17&&u!==14}else o=!0;if(o){if(this.state.noAnonFunctionType=!1,s=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),s;this.eat(12)}return s?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(s)]):i=this.flowParseFunctionTypeParams(),c.params=i.params,c.rest=i.rest,c.this=i._this,this.expect(11),this.expect(19),c.returnType=this.flowParseType(),c.typeParameters=null,this.finishNode(c,"FunctionTypeAnnotation")}case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(Oe.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(sC(this.state.type)){let c=_a(this.state.type);return this.next(),super.createIdentifier(n,c)}else if(Ct(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let r=this.state.startLoc,n=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let s=this.startNodeAt(r),o=this.eat(18);i=i||o,this.expect(0),!o&&this.match(3)?(s.elementType=n,this.next(),n=this.finishNode(s,"ArrayTypeAnnotation")):(s.objectType=n,s.indexType=this.flowParseType(),this.expect(3),i?(s.optional=o,n=this.finishNode(s,"OptionalIndexedAccessType")):n=this.finishNode(s,"IndexedAccessType"))}return n}flowParsePrefixType(){let r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(r.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(r)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){let r=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(r.types=[n];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?n:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){let r=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(r.types=[n];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?n:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){let r=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=r,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let r=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(r,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(r){let n=r?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(n.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(n)),n}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,n,i=!1){if(n){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,i));return}super.parseFunctionBody(r,!1,i)}parseFunctionBodyAndFinish(r,n,i=!1){if(this.match(14)){let s=this.startNode();[s.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=s.typeAnnotation?this.finishNode(s,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,n,i)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(Cs(i.type)){let s=this.startNode();return this.next(),this.flowParseInterface(s)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let n=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(r,n,i){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||Ct(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(r)}else if(Ct(this.state.type)){if(n.name==="interface")return this.flowParseInterface(r);if(n.name==="type")return this.flowParseTypeAlias(r);if(n.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,n,i)}shouldParseExportDeclaration(){let{type:r}=this.state;return HB(r)||this.shouldParseEnums()&&r===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:r}=this.state;return HB(r)||this.shouldParseEnums()&&r===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,n,i){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let d=this.lookaheadCharCode();if(d===44||d===61||d===58||d===41)return this.setOptionalParametersError(i),r}this.expect(17);let s=this.state.clone(),o=this.state.noArrowAt,a=this.startNodeAt(n),{consequent:c,failed:u}=this.tryParseConditionalConsequent(),[l,p]=this.getArrowLikeExpressions(c);if(u||p.length>0){let d=[...o];if(p.length>0){this.state=s,this.state.noArrowAt=d;for(let m=0;m<p.length;m++)d.push(p[m].start);({consequent:c,failed:u}=this.tryParseConditionalConsequent()),[l,p]=this.getArrowLikeExpressions(c)}u&&l.length>1&&this.raise(Oe.AmbiguousConditionalArrow,s.startLoc),u&&l.length===1&&(this.state=s,d.push(l[0].start),this.state.noArrowAt=d,{consequent:c,failed:u}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=o,this.expect(14),a.test=r,a.consequent=c,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let r=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:n}}getArrowLikeExpressions(r,n){let i=[r],s=[];for(;i.length!==0;){let o=i.pop();o.type==="ArrowFunctionExpression"&&o.body.type!=="BlockStatement"?(o.typeParameters||!o.returnType?this.finishArrowValidation(o):s.push(o),i.push(o.body)):o.type==="ConditionalExpression"&&(i.push(o.consequent),i.push(o.alternate))}return n?(s.forEach(o=>this.finishArrowValidation(o)),[s,[]]):zce(s,o=>o.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(r){var n;this.toAssignableList(r.params,(n=r.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,n){let i;return this.state.noArrowParamsConversionAt.includes(r.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),i=n(),this.state.noArrowParamsConversionAt.pop()):i=n(),i}parseParenItem(r,n){let i=super.parseParenItem(r,n);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){let s=this.startNodeAt(n);return s.expression=i,s.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(s,"TypeCastExpression")}return i}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.shouldParseEnums()&&this.isContextual(126)){r.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){let{startLoc:n}=this.state,i=super.maybeParseExportNamespaceSpecifier(r);return i&&r.exportKind==="type"&&this.unexpected(n),i}parseClassId(r,n,i){super.parseClassId(r,n,i),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,n,i){let{startLoc:s}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,n))return;n.declare=!0}super.parseClassMember(r,n,i),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(Oe.DeclareClassElement,s):n.value&&this.raise(Oe.DeclareClassFieldInitializer,n.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){let r=super.readWord1(),n="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(B.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(r){let n=this.input.charCodeAt(this.state.pos+1);r===123&&n===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?n===46?this.finishOp(18,2):this.finishOp(17,1):Sce(r,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,n){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,n):super.isAssignable(r,n)}toAssignable(r,n=!1){!n&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,n)}toAssignableList(r,n,i){for(let s=0;s<r.length;s++){let o=r[s];o?.type==="TypeCastExpression"&&(r[s]=this.typeCastToParameter(o))}super.toAssignableList(r,n,i)}toReferencedList(r,n){for(let s=0;s<r.length;s++){var i;let o=r[s];o&&o.type==="TypeCastExpression"&&!((i=o.extra)!=null&&i.parenthesized)&&(r.length>1||!n)&&this.raise(Oe.TypeCastInPattern,o.typeAnnotation)}return r}parseArrayLike(r,n,i,s){let o=super.parseArrayLike(r,n,i,s);return n&&!this.state.maybeInArrowParameters&&this.toReferencedList(o.elements),o}isValidLVal(r,n,i){return r==="TypeCastExpression"||super.isValidLVal(r,n,i)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,n,i,s,o,a){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,n,i,s,o,a),n.params&&o){let c=n.params;c.length>0&&this.isThisParam(c[0])&&this.raise(Oe.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&o&&n.value.params){let c=n.value.params;c.length>0&&this.isThisParam(c[0])&&this.raise(Oe.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(r,n,i,s){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,n,i,s)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&this.match(47)&&(r.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let n=r.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);let n=this.getObjectOrClassMethodParams(r);if(n.length>0){let i=n[0];this.isThisParam(i)&&r.kind==="get"?this.raise(Oe.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(Oe.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,n,i,s,o,a,c){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let u;this.match(47)&&!a&&(u=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let l=super.parseObjPropValue(r,n,i,s,o,a,c);return u&&((l.value||l).typeParameters=u),l}parseAssignableListItemTypes(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(Oe.PatternIsOptional,r),this.isThisParam(r)&&this.raise(Oe.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(Oe.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(Oe.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,n){let i=super.parseMaybeDefault(r,n);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(Oe.TypeBeforeInitializer,i.typeAnnotation),i}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(Oe.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,n,i){n.local=YB(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(n,i))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!r&&this.isContextual(87)}applyImportPhase(r,n,i,s){if(super.applyImportPhase(r,n,i,s),n){if(!i&&this.match(65))return;r.exportKind=i==="type"?i:"value"}else i==="type"&&this.match(55)&&this.unexpected(),r.importKind=i==="type"||i==="typeof"?i:"value"}parseImportSpecifier(r,n,i,s,o){let a=r.imported,c=null;a.type==="Identifier"&&(a.name==="type"?c="type":a.name==="typeof"&&(c="typeof"));let u=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let p=this.parseIdentifier(!0);c!==null&&!Cs(this.state.type)?(r.imported=p,r.importKind=c,r.local=Ho(p)):(r.imported=a,r.importKind=null,r.local=this.parseIdentifier())}else{if(c!==null&&Cs(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=c;else{if(n)throw this.raise(B.ImportBindingIsString,r,{importName:a.value});r.imported=a,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(u=!0,r.local=Ho(r.imported))}let l=YB(r);return i&&l&&this.raise(Oe.ImportTypeShorthandOnlyInPureImport,r),(i||l)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),u&&!i&&!l&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,n){let i=r.kind;i!=="get"&&i!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){if(this.match(14)){let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return super.parseAsyncArrowFromCallExpression(r,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,n){var i;let s=null,o;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(s=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(r,n),s),!o.error)return o.node;let{context:u}=this.state,l=u[u.length-1];(l===Mt.j_oTag||l===Mt.j_expr)&&u.pop()}if((i=o)!=null&&i.error||this.match(47)){var a,c;s=s||this.state.clone();let u,l=this.tryParse(d=>{var m;u=this.flowParseTypeParameterDeclaration();let f=this.forwardNoArrowParamsConversionAt(u,()=>{let y=super.parseMaybeAssign(r,n);return this.resetStartLocationFromNode(y,u),y});(m=f.extra)!=null&&m.parenthesized&&d();let g=this.maybeUnwrapTypeCastExpression(f);return g.type!=="ArrowFunctionExpression"&&d(),g.typeParameters=u,this.resetStartLocationFromNode(g,u),f},s),p=null;if(l.node&&this.maybeUnwrapTypeCastExpression(l.node).type==="ArrowFunctionExpression"){if(!l.error&&!l.aborted)return l.node.async&&this.raise(Oe.UnexpectedTypeParameterBeforeAsyncArrowFunction,u),l.node;p=l.node}if((a=o)!=null&&a.node)return this.state=o.failState,o.node;if(p)return this.state=l.failState,p;throw(c=o)!=null&&c.thrown?o.error:l.thrown?l.error:this.raise(Oe.UnexpectedTokenAfterTypeParameter,u)}return super.parseMaybeAssign(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let s=this.startNode();return[s.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),s});if(n.thrown)return null;n.error&&(this.state=n.failState),r.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,n){this.state.noArrowParamsConversionAt.includes(r.start)?r.params=n:super.setArrowFunctionParameters(r,n)}checkParams(r,n,i,s=!0){if(!(i&&this.state.noArrowParamsConversionAt.includes(r.start))){for(let o=0;o<r.params.length;o++)this.isThisParam(r.params[o])&&o>0&&this.raise(Oe.ThisParamMustBeFirst,r.params[o]);super.checkParams(r,n,i,s)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(r,n,i){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let s=this.startNodeAt(n);s.callee=r,s.arguments=super.parseCallExpressionArguments(11,!1),r=this.finishNode(s,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){let s=this.state.clone(),o=this.tryParse(c=>this.parseAsyncArrowWithTypeParameters(n)||c(),s);if(!o.error&&!o.aborted)return o.node;let a=this.tryParse(()=>super.parseSubscripts(r,n,i),s);if(a.node&&!a.error)return a.node;if(o.node)return this.state=o.failState,o.node;if(a.node)return this.state=a.failState,a.node;throw o.error||a.error}return super.parseSubscripts(r,n,i)}parseSubscript(r,n,i,s){if(this.match(18)&&this.isLookaheadToken_lt()){if(s.optionalChainMember=!0,i)return s.stop=!0,r;this.next();let o=this.startNodeAt(n);return o.callee=r,o.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),o.arguments=this.parseCallExpressionArguments(11,!1),o.optional=!0,this.finishCallExpression(o,!0)}else if(!i&&this.shouldParseTypes()&&this.match(47)){let o=this.startNodeAt(n);o.callee=r;let a=this.tryParse(()=>(o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),o.arguments=super.parseCallExpressionArguments(11,!1),s.optionalChainMember&&(o.optional=!1),this.finishCallExpression(o,s.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(r,n,i,s)}parseNewCallee(r){super.parseNewCallee(r);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=n}parseAsyncArrowWithTypeParameters(r){let n=this.startNodeAt(r);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,n){let i=super.parseTopLevel(r,n);return this.state.hasFlowComment&&this.raise(Oe.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Oe.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:r}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(r+n));)n++;let i=this.input.charCodeAt(n+r),s=this.input.charCodeAt(n+r+1);return i===58&&s===58?n+2:this.input.slice(n+r,n+r+12)==="flow-include"?n+12:i===58&&s!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(B.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:n,memberName:i}){this.raise(Oe.EnumBooleanMemberNotInitialized,r,{memberName:i,enumName:n})}flowEnumErrorInvalidMemberInitializer(r,n){return this.raise(n.explicitType?n.explicitType==="symbol"?Oe.EnumInvalidMemberInitializerSymbolType:Oe.EnumInvalidMemberInitializerPrimaryType:Oe.EnumInvalidMemberInitializerUnknownType,r,n)}flowEnumErrorNumberMemberNotInitialized(r,n){this.raise(Oe.EnumNumberMemberNotInitialized,r,n)}flowEnumErrorStringMemberInconsistentlyInitialized(r,n){this.raise(Oe.EnumStringMemberInconsistentlyInitialized,r,n)}flowEnumMemberInit(){let r=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let i=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 133:{let i=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){let r=this.state.startLoc,n=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:n,init:i}}flowEnumCheckExplicitTypeMismatch(r,n,i){let{explicitType:s}=n;s!==null&&s!==i&&this.flowEnumErrorInvalidMemberInitializer(r,n)}flowEnumMembers({enumName:r,explicitType:n}){let i=new Set,s={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let a=this.startNode(),{id:c,init:u}=this.flowEnumMemberRaw(),l=c.name;if(l==="")continue;/^[a-z]/.test(l)&&this.raise(Oe.EnumInvalidMemberName,c,{memberName:l,suggestion:l[0].toUpperCase()+l.slice(1),enumName:r}),i.has(l)&&this.raise(Oe.EnumDuplicateMemberName,c,{memberName:l,enumName:r}),i.add(l);let p={enumName:r,explicitType:n,memberName:l};switch(a.id=c,u.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"boolean"),a.init=u.value,s.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"number"),a.init=u.value,s.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"string"),a.init=u.value,s.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(u.loc,p);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(u.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(u.loc,p);break;default:s.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:s,hasUnknownMembers:o}}flowEnumStringMembers(r,n,{enumName:i}){if(r.length===0)return n;if(n.length===0)return r;if(n.length>r.length){for(let s of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:i});return n}else{for(let s of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:i});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!Ct(this.state.type))throw this.raise(Oe.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(Oe.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:n}),n}flowEnumBody(r,n){let i=n.name,s=n.loc.start,o=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:a,hasUnknownMembers:c}=this.flowEnumMembers({enumName:i,explicitType:o});switch(r.hasUnknownMembers=c,o){case"boolean":return r.explicitType=!0,r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=a.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{let u=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;let l=a.booleanMembers.length,p=a.numberMembers.length,d=a.stringMembers.length,m=a.defaultedMembers.length;if(!l&&!p&&!d&&!m)return u();if(!l&&!p)return r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!p&&!d&&l>=m){for(let f of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(f.loc.start,{enumName:i,memberName:f.id.name});return r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!l&&!d&&p>=m){for(let f of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(f.loc.start,{enumName:i,memberName:f.id.name});return r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(Oe.EnumInconsistentMemberValues,s,{enumName:i}),u()}}}flowParseEnumDeclaration(r){let n=this.parseIdentifier();return r.id=n,r.body=this.flowEnumBody(this.startNode(),n),this.finishNode(r,"EnumDeclaration")}isLookaheadToken_lt(){let r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){let n=this.input.charCodeAt(r+1);return n!==60&&n!==61}return!1}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}},Hce={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},$c=Vo`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Aa(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function Ul(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return Ul(t.object)+"."+Ul(t.property);throw new Error("Node had unexpected type: "+t.type)}var Kce=t=>class extends t{jsxReadToken(){let r="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise($c.UnterminatedJsxContent,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(i);return}r+=this.input.slice(n,this.state.pos),this.finishToken(141,r);return;case 38:r+=this.input.slice(n,this.state.pos),r+=this.jsxReadEntity(),n=this.state.pos;break;case 62:case 125:default:zl(i)?(r+=this.input.slice(n,this.state.pos),r+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){let n=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=r?`
|
|
1114
1114
|
`:`\r
|
|
1115
1115
|
`):i=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(r){let n="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(B.UnterminatedString,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);if(s===r)break;s===38?(n+=this.input.slice(i,this.state.pos),n+=this.jsxReadEntity(),i=this.state.pos):zl(s)?(n+=this.input.slice(i,this.state.pos),n+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}n+=this.input.slice(i,this.state.pos++),this.finishToken(133,n)}jsxReadEntity(){let r=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let n=10;this.codePointAtPos(this.state.pos)===120&&(n=16,++this.state.pos);let i=this.readInt(n,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let n=0,i=!1;for(;n++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let s=this.input.slice(r,this.state.pos),o=Hce[s];if(++this.state.pos,o)return o}}return this.state.pos=r,"&"}jsxReadWord(){let r,n=this.state.pos;do r=this.input.charCodeAt(++this.state.pos);while(ql(r)||r===45);this.finishToken(140,this.input.slice(n,this.state.pos))}jsxParseIdentifier(){let r=this.startNode();return this.match(140)?r.name=this.state.value:sC(this.state.type)?r.name=_a(this.state.type):this.unexpected(),this.next(),this.finishNode(r,"JSXIdentifier")}jsxParseNamespacedName(){let r=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(14))return n;let i=this.startNodeAt(r);return i.namespace=n,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let r=this.state.startLoc,n=this.jsxParseNamespacedName();if(n.type==="JSXNamespacedName")return n;for(;this.eat(16);){let i=this.startNodeAt(r);i.object=n,i.property=this.jsxParseIdentifier(),n=this.finishNode(i,"JSXMemberExpression")}return n}jsxParseAttributeValue(){let r;switch(this.state.type){case 5:return r=this.startNode(),this.setContext(Mt.brace),this.next(),r=this.jsxParseExpressionContainer(r,Mt.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise($c.AttributeIsEmpty,r),r;case 142:case 133:return this.parseExprAtom();default:throw this.raise($c.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let r=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(r,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(r){return this.next(),r.expression=this.parseExpression(),this.setContext(Mt.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadChild")}jsxParseExpressionContainer(r,n){if(this.match(8))r.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();r.expression=i}return this.setContext(n),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXExpressionContainer")}jsxParseAttribute(){let r=this.startNode();return this.match(5)?(this.setContext(Mt.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(Mt.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadAttribute")):(r.name=this.jsxParseNamespacedName(),r.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(r,"JSXAttribute"))}jsxParseOpeningElementAt(r){let n=this.startNodeAt(r);return this.eat(143)?this.finishNode(n,"JSXOpeningFragment"):(n.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(n))}jsxParseOpeningElementAfterName(r){let n=[];for(;!this.match(56)&&!this.match(143);)n.push(this.jsxParseAttribute());return r.attributes=n,r.selfClosing=this.eat(56),this.expect(143),this.finishNode(r,"JSXOpeningElement")}jsxParseClosingElementAt(r){let n=this.startNodeAt(r);return this.eat(143)?this.finishNode(n,"JSXClosingFragment"):(n.name=this.jsxParseElementName(),this.expect(143),this.finishNode(n,"JSXClosingElement"))}jsxParseElementAt(r){let n=this.startNodeAt(r),i=[],s=this.jsxParseOpeningElementAt(r),o=null;if(!s.selfClosing){e:for(;;)switch(this.state.type){case 142:if(r=this.state.startLoc,this.next(),this.eat(56)){o=this.jsxParseClosingElementAt(r);break e}i.push(this.jsxParseElementAt(r));break;case 141:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let a=this.startNode();this.setContext(Mt.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(a)):i.push(this.jsxParseExpressionContainer(a,Mt.j_expr));break}default:this.unexpected()}Aa(s)&&!Aa(o)&&o!==null?this.raise($c.MissingClosingTagFragment,o):!Aa(s)&&Aa(o)?this.raise($c.MissingClosingTagElement,o,{openingTagName:Ul(s.name)}):!Aa(s)&&!Aa(o)&&Ul(o.name)!==Ul(s.name)&&this.raise($c.MissingClosingTagElement,o,{openingTagName:Ul(s.name)})}if(Aa(s)?(n.openingFragment=s,n.closingFragment=o):(n.openingElement=s,n.closingElement=o),n.children=i,this.match(47))throw this.raise($c.UnwrappedAdjacentJSXElements,this.state.startLoc);return Aa(s)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){let r=this.state.startLoc;return this.next(),this.jsxParseElementAt(r)}setContext(r){let{context:n}=this.state;n[n.length-1]=r}parseExprAtom(r){return this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):super.parseExprAtom(r)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(r){let n=this.curContext();if(n===Mt.j_expr){this.jsxReadToken();return}if(n===Mt.j_oTag||n===Mt.j_cTag){if(Go(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(143);return}if((r===34||r===39)&&n===Mt.j_oTag){this.jsxReadString(r);return}}if(r===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}super.getTokenFromCode(r)}updateContext(r){let{context:n,type:i}=this.state;if(i===56&&r===142)n.splice(-2,2,Mt.j_cTag),this.state.canStartJSXElement=!1;else if(i===142)n.push(Mt.j_oTag);else if(i===143){let s=n[n.length-1];s===Mt.j_oTag&&r===56||s===Mt.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===Mt.j_expr):(this.setContext(Mt.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=uce(i)}},WE=class extends Sf{constructor(...e){super(...e),this.tsNames=new Map}},JE=class extends Tf{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new WE(e)}enter(e){e===256&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===256&&this.importsStack.pop(),e}hasImport(e,r){let n=this.importsStack.length;if(this.importsStack[n-1].has(e))return!0;if(!r&&n>1){for(let i=0;i<n-1;i++)if(this.importsStack[i].has(e))return!0}return!1}declareName(e,r,n){if(r&4096){this.hasImport(e,!0)&&this.parser.raise(B.VarRedeclaration,n,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let i=this.currentScope(),s=i.tsNames.get(e)||0;if(r&1024){this.maybeExportDefined(i,e),i.tsNames.set(e,s|16);return}super.declareName(e,r,n),r&2&&(r&1||(this.checkRedeclarationInScope(i,e,r,n),this.maybeExportDefined(i,e)),s=s|1),r&256&&(s=s|2),r&512&&(s=s|4),r&128&&(s=s|8),s&&i.tsNames.set(e,s)}isRedeclaredInScope(e,r,n){let i=e.tsNames.get(r);if((i&2)>0){if(n&256){let s=!!(n&512),o=(i&4)>0;return s!==o}return!0}return n&128&&(i&8)>0?e.names.get(r)&2?!!(n&1):!1:n&2&&(i&1)>0?!0:super.isRedeclaredInScope(e,r,n)}checkLocalExport(e){let{name:r}=e;if(this.hasImport(r))return;let n=this.scopeStack.length;for(let i=n-1;i>=0;i--){let o=this.scopeStack[i].tsNames.get(r);if((o&1)>0||(o&16)>0)return}super.checkLocalExport(e)}},mM=t=>t.type==="ParenthesizedExpression"?mM(t.expression):t,YE=class extends KE{toAssignable(e,r=!1){var n,i;let s;switch((e.type==="ParenthesizedExpression"||(n=e.extra)!=null&&n.parenthesized)&&(s=mM(e),r?s.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(B.InvalidParenthesizedAssignment,e):s.type!=="MemberExpression"&&!this.isOptionalMemberExpression(s)&&this.raise(B.InvalidParenthesizedAssignment,e):this.raise(B.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let a=0,c=e.properties.length,u=c-1;a<c;a++){var o;let l=e.properties[a],p=a===u;this.toAssignableObjectExpressionProp(l,p,r),p&&l.type==="RestElement"&&(o=e.extra)!=null&&o.trailingCommaLoc&&this.raise(B.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:a,value:c}=e;this.isPrivateName(a)&&this.classScope.usePrivateName(this.getPrivateNameSV(a),a.loc.start),this.toAssignable(c,r);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,(i=e.extra)==null?void 0:i.trailingCommaLoc,r);break;case"AssignmentExpression":e.operator!=="="&&this.raise(B.MissingEqInAssignment,e.left.loc.end),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,r);break;case"ParenthesizedExpression":this.toAssignable(s,r);break}}toAssignableObjectExpressionProp(e,r,n){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?B.PatternHasAccessor:B.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){e.type="RestElement";let i=e.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,n),r||this.raise(B.RestTrailingComma,e)}else this.toAssignable(e,n)}toAssignableList(e,r,n){let i=e.length-1;for(let s=0;s<=i;s++){let o=e[s];if(o){if(o.type==="SpreadElement"){o.type="RestElement";let a=o.argument;this.checkToRestConversion(a,!0),this.toAssignable(a,n)}else this.toAssignable(o,n);o.type==="RestElement"&&(s<i?this.raise(B.RestTrailingComma,o):r&&this.raise(B.RestTrailingComma,r))}}}isAssignable(e,r){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let n=e.properties.length-1;return e.properties.every((i,s)=>i.type!=="ObjectMethod"&&(s===n||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(n=>n===null||this.isAssignable(n));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(e,r){return e}toReferencedListDeep(e,r){this.toReferencedList(e,r);for(let n of e)n?.type==="ArrayExpression"&&this.toReferencedListDeep(n.elements)}parseSpread(e){let r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){let e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,r,n){let i=n&1,s=[],o=!0;for(;!this.eat(e);)if(o?o=!1:this.expect(12),i&&this.match(12))s.push(null);else{if(this.eat(e))break;if(this.match(21)){if(s.push(this.parseAssignableListItemTypes(this.parseRestBinding(),n)),!this.checkCommaAfterRest(r)){this.expect(e);break}}else{let a=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(B.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)a.push(this.parseDecorator());s.push(this.parseAssignableListItem(n,a))}}return s}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let{type:e,startLoc:r}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return e===138?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,r,!1,!1,!0,!1)}parseAssignableListItem(e,r){let n=this.parseMaybeDefault();this.parseAssignableListItemTypes(n,e);let i=this.parseMaybeDefault(n.loc.start,n);return r.length&&(n.decorators=r),i}parseAssignableListItemTypes(e,r){return e}parseMaybeDefault(e,r){var n,i;if((n=e)!=null||(e=this.state.startLoc),r=(i=r)!=null?i:this.parseBindingAtom(),!this.eat(29))return r;let s=this.startNodeAt(e);return s.left=r,s.right=this.parseMaybeAssignAllowIn(),this.finishNode(s,"AssignmentPattern")}isValidLVal(e,r,n){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(e){return e.type==="OptionalMemberExpression"}checkLVal(e,r,n=64,i=!1,s=!1,o=!1){var a;let c=e.type;if(this.isObjectMethod(e))return;let u=this.isOptionalMemberExpression(e);if(u||c==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",e.loc.start),r.type!=="AssignmentExpression"&&this.raise(B.InvalidLhsOptionalChaining,e,{ancestor:r})),n!==64&&this.raise(B.InvalidPropertyBindingPattern,e);return}if(c==="Identifier"){this.checkIdentifier(e,n,s);let{name:g}=e;i&&(i.has(g)?this.raise(B.ParamDupe,e):i.add(g));return}let l=this.isValidLVal(c,!(o||(a=e.extra)!=null&&a.parenthesized)&&r.type==="AssignmentExpression",n);if(l===!0)return;if(l===!1){let g=n===64?B.InvalidLhs:B.InvalidLhsBinding;this.raise(g,e,{ancestor:r});return}let p,d;typeof l=="string"?(p=l,d=c==="ParenthesizedExpression"):[p,d]=l;let m=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:r,f=e[p];if(Array.isArray(f))for(let g of f)g&&this.checkLVal(g,m,n,i,s,d);else f&&this.checkLVal(f,m,n,i,s,d)}checkIdentifier(e,r,n=!1){this.state.strict&&(n?uM(e.name,this.inModule):cM(e.name))&&(r===64?this.raise(B.StrictEvalArguments,e,{referenceName:e.name}):this.raise(B.StrictEvalArgumentsBinding,e,{bindingName:e.name})),r&8192&&e.name==="let"&&this.raise(B.LetInLexicalBinding,e),r&64||this.declareNameFromIdentifier(e,r)}declareNameFromIdentifier(e,r){this.scope.declareName(e.name,r,e.loc.start)}checkToRestConversion(e,r){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(B.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?B.RestTrailingComma:B.ElementAfterRest,this.state.startLoc),!0):!1}};function Wce(t){if(t==null)throw new Error(`Unexpected ${t} value.`);return t}function XB(t){if(!t)throw new Error("Assert fail")}var Se=Vo`typescript`({AbstractMethodHasImplementation:({methodName:t})=>`Method '${t}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:t})=>`Property '${t}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:t})=>`'declare' is not allowed in ${t}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:t})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:t})=>`Duplicate modifier: '${t}'.`,EmptyHeritageClauseType:({token:t})=>`'${t}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:t})=>`'${t[0]}' modifier cannot be used with '${t[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:t})=>`Index signatures cannot have an accessibility modifier ('${t}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:t})=>`'${t}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:t})=>`'${t}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:t})=>`'${t}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:t})=>`'${t[0]}' modifier must precede '${t[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:t})=>`Private elements cannot have an accessibility modifier ('${t}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:t})=>`Single type parameter ${t} should have a trailing comma. Example usage: <${t},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:t})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${t}.`});function Jce(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function QB(t){return t==="private"||t==="public"||t==="protected"}function Yce(t){return t==="in"||t==="out"}var Xce=t=>class extends t{constructor(...r){super(...r),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:Se.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:Se.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Se.InvalidModifierOnTypeParameter})}getScopeHandler(){return JE}tsIsIdentifier(){return Ct(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(r,n){if(!Ct(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(r.includes(i)){if(n&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:r,disallowedModifiers:n,stopOnStartOfClassStaticBlock:i,errorTemplate:s=Se.InvalidModifierOnTypeMember},o){let a=(u,l,p,d)=>{l===p&&o[d]&&this.raise(Se.InvalidModifiersOrder,u,{orderedModifiers:[p,d]})},c=(u,l,p,d)=>{(o[p]&&l===d||o[d]&&l===p)&&this.raise(Se.IncompatibleModifiers,u,{modifiers:[p,d]})};for(;;){let{startLoc:u}=this.state,l=this.tsParseModifier(r.concat(n??[]),i);if(!l)break;QB(l)?o.accessibility?this.raise(Se.DuplicateAccessibilityModifier,u,{modifier:l}):(a(u,l,l,"override"),a(u,l,l,"static"),a(u,l,l,"readonly"),o.accessibility=l):Yce(l)?(o[l]&&this.raise(Se.DuplicateModifier,u,{modifier:l}),o[l]=!0,a(u,l,"in","out")):(hasOwnProperty.call(o,l)?this.raise(Se.DuplicateModifier,u,{modifier:l}):(a(u,l,"static","readonly"),a(u,l,"static","override"),a(u,l,"override","readonly"),a(u,l,"abstract","override"),c(u,l,"declare","override"),c(u,l,"static","abstract")),o[l]=!0),n!=null&&n.includes(l)&&this.raise(s,u,{modifier:l})}}tsIsListTerminator(r){switch(r){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(r,n){let i=[];for(;!this.tsIsListTerminator(r);)i.push(n());return i}tsParseDelimitedList(r,n,i){return Wce(this.tsParseDelimitedListWorker(r,n,!0,i))}tsParseDelimitedListWorker(r,n,i,s){let o=[],a=-1;for(;!this.tsIsListTerminator(r);){a=-1;let c=n();if(c==null)return;if(o.push(c),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(r))break;i&&this.expect(12);return}return s&&(s.value=a),o}tsParseBracketedList(r,n,i,s,o){s||(i?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(r,n,o);return i?this.expect(3):this.expect(48),a}tsParseImportType(){let r=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(Se.UnsupportedImportTypeArgument,this.state.startLoc),r.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(r.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(r.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(r.qualifier=this.tsParseEntityName()),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSImportType")}tsParseEntityName(r=!0){let n=this.parseIdentifier(r);for(;this.eat(16);){let i=this.startNodeAtNode(n);i.left=n,i.right=this.parseIdentifier(r),n=this.finishNode(i,"TSQualifiedName")}return n}tsParseTypeReference(){let r=this.startNode();return r.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeReference")}tsParseThisTypePredicate(r){this.next();let n=this.startNodeAtNode(r);return n.parameterName=r,n.typeAnnotation=this.tsParseTypeAnnotation(!1),n.asserts=!1,this.finishNode(n,"TSTypePredicate")}tsParseThisTypeNode(){let r=this.startNode();return this.next(),this.finishNode(r,"TSThisType")}tsParseTypeQuery(){let r=this.startNode();return this.expect(87),this.match(83)?r.exprName=this.tsParseImportType():r.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeQuery")}tsParseTypeParameter(r){let n=this.startNode();return r(n),n.name=this.tsParseTypeParameterName(),n.constraint=this.tsEatThenParseType(81),n.default=this.tsEatThenParseType(29),this.finishNode(n,"TSTypeParameter")}tsTryParseTypeParameters(r){if(this.match(47))return this.tsParseTypeParameters(r)}tsParseTypeParameters(r){let n=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let i={value:-1};return n.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,r),!1,!0,i),n.params.length===0&&this.raise(Se.EmptyTypeParameters,n),i.value!==-1&&this.addExtra(n,"trailingComma",i.value),this.finishNode(n,"TSTypeParameterDeclaration")}tsFillSignature(r,n){let i=r===19,s="parameters",o="typeAnnotation";n.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),n[s]=this.tsParseBindingListForSignature(),i?n[o]=this.tsParseTypeOrTypePredicateAnnotation(r):this.match(r)&&(n[o]=this.tsParseTypeOrTypePredicateAnnotation(r))}tsParseBindingListForSignature(){let r=super.parseBindingList(11,41,2);for(let n of r){let{type:i}=n;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(Se.UnsupportedSignatureParameterKind,n,{type:i})}return r}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(r,n){return this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon(),this.finishNode(n,r)}tsIsUnambiguouslyIndexSignature(){return this.next(),Ct(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(r){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let n=this.parseIdentifier();n.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(n),this.expect(3),r.parameters=[n];let i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSIndexSignature")}tsParsePropertyOrMethodSignature(r,n){this.eat(17)&&(r.optional=!0);let i=r;if(this.match(10)||this.match(47)){n&&this.raise(Se.ReadonlyForMethodSignature,r);let s=i;s.kind&&this.match(47)&&this.raise(Se.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon();let o="parameters",a="typeAnnotation";if(s.kind==="get")s[o].length>0&&(this.raise(B.BadGetterArity,this.state.curPosition()),this.isThisParam(s[o][0])&&this.raise(Se.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(s.kind==="set"){if(s[o].length!==1)this.raise(B.BadSetterArity,this.state.curPosition());else{let c=s[o][0];this.isThisParam(c)&&this.raise(Se.AccessorCannotDeclareThisParameter,this.state.curPosition()),c.type==="Identifier"&&c.optional&&this.raise(Se.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),c.type==="RestElement"&&this.raise(Se.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s[a]&&this.raise(Se.SetAccessorCannotHaveReturnType,s[a])}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}else{let s=i;n&&(s.readonly=!0);let o=this.tsTryParseTypeAnnotation();return o&&(s.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSPropertySignature")}}tsParseTypeMember(){let r=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",r);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",r):(r.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(r,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},r);let n=this.tsTryParseIndexSignature(r);return n||(super.parsePropertyName(r),!r.computed&&r.key.type==="Identifier"&&(r.key.name==="get"||r.key.name==="set")&&this.tsTokenCanFollowModifier()&&(r.kind=r.key.name,super.parsePropertyName(r)),this.tsParsePropertyOrMethodSignature(r,!!r.readonly))}tsParseTypeLiteral(){let r=this.startNode();return r.members=this.tsParseObjectTypeMembers(),this.finishNode(r,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let r=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),r}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let r=this.startNode();this.expect(5),this.match(53)?(r.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(r.readonly=!0),this.expect(0);{let n=this.startNode();n.name=this.tsParseTypeParameterName(),n.constraint=this.tsExpectThenParseType(58),r.typeParameter=this.finishNode(n,"TSTypeParameter")}return r.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(r.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(r.optional=!0),r.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(r,"TSMappedType")}tsParseTupleType(){let r=this.startNode();r.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let n=!1;return r.elementTypes.forEach(i=>{let{type:s}=i;n&&s!=="TSRestType"&&s!=="TSOptionalType"&&!(s==="TSNamedTupleMember"&&i.optional)&&this.raise(Se.OptionalTypeBeforeRequired,i),n||(n=s==="TSNamedTupleMember"&&i.optional||s==="TSOptionalType")}),this.finishNode(r,"TSTupleType")}tsParseTupleElementType(){let{startLoc:r}=this.state,n=this.eat(21),i,s,o,a,u=Cs(this.state.type)?this.lookaheadCharCode():null;if(u===58)i=!0,o=!1,s=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(u===63){o=!0;let l=this.state.startLoc,p=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,s=this.createIdentifier(this.startNodeAt(l),p),this.expect(17),this.expect(14),a=this.tsParseType()):(i=!1,a=d,this.expect(17))}else a=this.tsParseType(),o=this.eat(17),i=this.eat(14);if(i){let l;s?(l=this.startNodeAtNode(s),l.optional=o,l.label=s,l.elementType=a,this.eat(17)&&(l.optional=!0,this.raise(Se.TupleOptionalAfterType,this.state.lastTokStartLoc))):(l=this.startNodeAtNode(a),l.optional=o,this.raise(Se.InvalidTupleMemberLabel,a),l.label=a,l.elementType=this.tsParseType()),a=this.finishNode(l,"TSNamedTupleMember")}else if(o){let l=this.startNodeAtNode(a);l.typeAnnotation=a,a=this.finishNode(l,"TSOptionalType")}if(n){let l=this.startNodeAt(r);l.typeAnnotation=a,a=this.finishNode(l,"TSRestType")}return a}tsParseParenthesizedType(){let r=this.startNode();return this.expect(10),r.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(r,"TSParenthesizedType")}tsParseFunctionOrConstructorType(r,n){let i=this.startNode();return r==="TSConstructorType"&&(i.abstract=!!n,n&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,r)}tsParseLiteralTypeNode(){let r=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:r.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(r,"TSLiteralType")}tsParseTemplateLiteralType(){let r=this.startNode();return r.literal=super.parseTemplate(!1),this.finishNode(r,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let r=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(r):r}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let r=this.startNode(),n=this.lookahead();return n.type!==134&&n.type!==135&&this.unexpected(),r.literal=this.parseMaybeUnary(),this.finishNode(r,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:r}=this.state;if(Ct(r)||r===88||r===84){let n=r===88?"TSVoidKeyword":r===84?"TSNullKeyword":Jce(this.state.value);if(n!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,n)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let r=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let n=this.startNodeAtNode(r);n.elementType=r,this.expect(3),r=this.finishNode(n,"TSArrayType")}else{let n=this.startNodeAtNode(r);n.objectType=r,n.indexType=this.tsParseType(),this.expect(3),r=this.finishNode(n,"TSIndexedAccessType")}return r}tsParseTypeOperator(){let r=this.startNode(),n=this.state.value;return this.next(),r.operator=n,r.typeAnnotation=this.tsParseTypeOperatorOrHigher(),n==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(r),this.finishNode(r,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(r){switch(r.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Se.UnexpectedReadonly,r)}}tsParseInferType(){let r=this.startNode();this.expectContextual(115);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),r.typeParameter=this.finishNode(n,"TSTypeParameter"),this.finishNode(r,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let r=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return r}}tsParseTypeOperatorOrHigher(){return hce(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(r,n,i){let s=this.startNode(),o=this.eat(i),a=[];do a.push(n());while(this.eat(i));return a.length===1&&!o?a[0]:(s.types=a,this.finishNode(s,r))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(Ct(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:r}=this.state,n=r.length;try{return this.parseObjectLike(8,!0),r.length===n}catch{return!1}}if(this.match(0)){this.next();let{errors:r}=this.state,n=r.length;try{return super.parseBindingList(3,93,1),r.length===n}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(r){return this.tsInType(()=>{let n=this.startNode();this.expect(r);let i=this.startNode(),s=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(s&&this.match(78)){let c=this.tsParseThisTypeOrThisTypePredicate();return c.type==="TSThisType"?(i.parameterName=c,i.asserts=!0,i.typeAnnotation=null,c=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(c,i),c.asserts=!0),n.typeAnnotation=c,this.finishNode(n,"TSTypeAnnotation")}let o=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!o)return s?(i.parameterName=this.parseIdentifier(),i.asserts=s,i.typeAnnotation=null,n.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,n);let a=this.tsParseTypeAnnotation(!1);return i.parameterName=o,i.typeAnnotation=a,i.asserts=s,n.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let r=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),r}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let r=this.state.containsEsc;return this.next(),!Ct(this.state.type)&&!this.match(78)?!1:(r&&this.raise(B.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(r=!0,n=this.startNode()){return this.tsInType(()=>{r&&this.expect(14),n.typeAnnotation=this.tsParseType()}),this.finishNode(n,"TSTypeAnnotation")}tsParseType(){XB(this.state.inType);let r=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return r;let n=this.startNodeAtNode(r);return n.checkType=r,n.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),n.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),n.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(n,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Se.ReservedTypeAssertion,this.state.startLoc);let r=this.startNode();return r.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),r.expression=this.parseMaybeUnary(),this.finishNode(r,"TSTypeAssertion")}tsParseHeritageClause(r){let n=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let s=this.startNode();return s.expression=this.tsParseEntityName(),this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSExpressionWithTypeArguments")});return i.length||this.raise(Se.EmptyHeritageClauseType,n,{token:r}),i}tsParseInterfaceDeclaration(r,n={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),n.declare&&(r.declare=!0),Ct(this.state.type)?(r.id=this.parseIdentifier(),this.checkIdentifier(r.id,130)):(r.id=null,this.raise(Se.MissingInterfaceName,this.state.startLoc)),r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(r.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),r.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(r,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(r){return r.id=this.parseIdentifier(),this.checkIdentifier(r.id,2),r.typeAnnotation=this.tsInType(()=>{if(r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let n=this.startNode();return this.next(),this.finishNode(n,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(r,"TSTypeAliasDeclaration")}tsInNoContext(r){let n=this.state.context;this.state.context=[n[0]];try{return r()}finally{this.state.context=n}}tsInType(r){let n=this.state.inType;this.state.inType=!0;try{return r()}finally{this.state.inType=n}}tsInDisallowConditionalTypesContext(r){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return r()}finally{this.state.inDisallowConditionalTypesContext=n}}tsInAllowConditionalTypesContext(r){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return r()}finally{this.state.inDisallowConditionalTypesContext=n}}tsEatThenParseType(r){if(this.match(r))return this.tsNextThenParseType()}tsExpectThenParseType(r){return this.tsInType(()=>(this.expect(r),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let r=this.startNode();return r.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(r.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(r,"TSEnumMember")}tsParseEnumDeclaration(r,n={}){return n.const&&(r.const=!0),n.declare&&(r.declare=!0),this.expectContextual(126),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,r.const?8971:8459),this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumDeclaration")}tsParseModuleBlock(){let r=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(r.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(r,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(r,n=!1){if(r.id=this.parseIdentifier(),n||this.checkIdentifier(r.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),r.body=i}else this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(r,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(r){return this.isContextual(112)?(r.global=!0,r.id=this.parseIdentifier()):this.match(133)?r.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(r,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(r,n,i){r.isExport=i||!1,r.id=n||this.parseIdentifier(),this.checkIdentifier(r.id,4096),this.expect(29);let s=this.tsParseModuleReference();return r.importKind==="type"&&s.type!=="TSExternalModuleReference"&&this.raise(Se.ImportAliasHasImportType,s),r.moduleReference=s,this.semicolon(),this.finishNode(r,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let r=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),r.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExternalModuleReference")}tsLookAhead(r){let n=this.state.clone(),i=r();return this.state=n,i}tsTryParseAndCatch(r){let n=this.tryParse(i=>r()||i());if(!(n.aborted||!n.node))return n.error&&(this.state=n.failState),n.node}tsTryParse(r){let n=this.state.clone(),i=r();if(i!==void 0&&i!==!1)return i;this.state=n}tsTryParseDeclare(r){if(this.isLineTerminator())return;let n=this.state.type,i;return this.isContextual(100)&&(n=74,i="let"),this.tsInAmbientContext(()=>{switch(n){case 68:return r.declare=!0,super.parseFunctionStatement(r,!1,!1);case 80:return r.declare=!0,this.parseClass(r,!0,!1);case 126:return this.tsParseEnumDeclaration(r,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(r);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(r.declare=!0,this.parseVarStatement(r,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(r,{const:!0,declare:!0}));case 129:{let s=this.tsParseInterfaceDeclaration(r,{declare:!0});if(s)return s}default:if(Ct(n))return this.tsParseDeclaration(r,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(r,n,i){switch(n.name){case"declare":{let s=this.tsTryParseDeclare(r);return s&&(s.declare=!0),s}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let s=r;return s.global=!0,s.id=n,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(r,n.name,!1,i)}}tsParseDeclaration(r,n,i,s){switch(n){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||Ct(this.state.type)))return this.tsParseAbstractDeclaration(r,s);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(r);if(Ct(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(r)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&Ct(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(r);break;case"type":if(this.tsCheckLineTerminator(i)&&Ct(this.state.type))return this.tsParseTypeAliasDeclaration(r);break}}tsCheckLineTerminator(r){return r?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(r){if(!this.match(47))return;let n=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let s=this.startNodeAt(r);return s.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),s});if(this.state.maybeInArrowParameters=n,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let r=this.startNode();return r.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),r.params.length===0?this.raise(Se.EmptyTypeArguments,r):!this.state.inType&&this.curContext()===Mt.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return gce(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(r,n){let i=this.state.startLoc,s={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},s);let o=s.accessibility,a=s.override,c=s.readonly;!(r&4)&&(o||c||a)&&this.raise(Se.UnexpectedParameterModifier,i);let u=this.parseMaybeDefault();this.parseAssignableListItemTypes(u,r);let l=this.parseMaybeDefault(u.loc.start,u);if(o||c||a){let p=this.startNodeAt(i);return n.length&&(p.decorators=n),o&&(p.accessibility=o),c&&(p.readonly=c),a&&(p.override=a),l.type!=="Identifier"&&l.type!=="AssignmentPattern"&&this.raise(Se.UnsupportedParameterPropertyKind,p),p.parameter=l,this.finishNode(p,"TSParameterProperty")}return n.length&&(u.decorators=n),l}isSimpleParameter(r){return r.type==="TSParameterProperty"&&super.isSimpleParameter(r.parameter)||super.isSimpleParameter(r)}tsDisallowOptionalPattern(r){for(let n of r.params)n.type!=="Identifier"&&n.optional&&!this.state.isAmbientContext&&this.raise(Se.PatternIsOptional,n)}setArrowFunctionParameters(r,n,i){super.setArrowFunctionParameters(r,n,i),this.tsDisallowOptionalPattern(r)}parseFunctionBodyAndFinish(r,n,i=!1){this.match(14)&&(r.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let s=n==="FunctionDeclaration"?"TSDeclareFunction":n==="ClassMethod"||n==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return s&&!this.match(5)&&this.isLineTerminator()?this.finishNode(r,s):s==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(Se.DeclareFunctionHasImplementation,r),r.declare)?super.parseFunctionBodyAndFinish(r,s,i):(this.tsDisallowOptionalPattern(r),super.parseFunctionBodyAndFinish(r,n,i))}registerFunctionStatementId(r){!r.body&&r.id?this.checkIdentifier(r.id,1024):super.registerFunctionStatementId(r)}tsCheckForInvalidTypeCasts(r){r.forEach(n=>{n?.type==="TSTypeCastExpression"&&this.raise(Se.UnexpectedTypeAnnotation,n.typeAnnotation)})}toReferencedList(r,n){return this.tsCheckForInvalidTypeCasts(r),r}parseArrayLike(r,n,i,s){let o=super.parseArrayLike(r,n,i,s);return o.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(o.elements),o}parseSubscript(r,n,i,s){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let a=this.startNodeAt(n);return a.expression=r,this.finishNode(a,"TSNonNullExpression")}let o=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return s.stop=!0,r;s.optionalChainMember=o=!0,this.next()}if(this.match(47)||this.match(51)){let a,c=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(r)){let d=this.tsTryParseGenericAsyncArrowFunction(n);if(d)return d}let u=this.tsParseTypeArgumentsInExpression();if(!u)return;if(o&&!this.match(10)){a=this.state.curPosition();return}if(ay(this.state.type)){let d=super.parseTaggedTemplateExpression(r,n,s);return d.typeParameters=u,d}if(!i&&this.eat(10)){let d=this.startNodeAt(n);return d.callee=r,d.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(d.arguments),d.typeParameters=u,s.optionalChainMember&&(d.optional=o),this.finishCallExpression(d,s.optionalChainMember)}let l=this.state.type;if(l===48||l===52||l!==10&&NE(l)&&!this.hasPrecedingLineBreak())return;let p=this.startNodeAt(n);return p.expression=r,p.typeParameters=u,this.finishNode(p,"TSInstantiationExpression")});if(a&&this.unexpected(a,10),c)return c.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(Se.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),c}return super.parseSubscript(r,n,i,s)}parseNewCallee(r){var n;super.parseNewCallee(r);let{callee:i}=r;i.type==="TSInstantiationExpression"&&!((n=i.extra)!=null&&n.parenthesized)&&(r.typeParameters=i.typeParameters,r.callee=i.expression)}parseExprOp(r,n,i){let s;if(iy(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(s=this.isContextual(120)))){let o=this.startNodeAt(n);return o.expression=r,o.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(s&&this.raise(B.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(o,s?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(o,n,i)}return super.parseExprOp(r,n,i)}checkReservedWord(r,n,i,s){this.state.isAmbientContext||super.checkReservedWord(r,n,i,s)}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(Se.ImportReflectionHasImportType,r.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){let n=this.lookaheadCharCode();return r?n===123||n===42:n!==61}return!r&&this.isContextual(87)}applyImportPhase(r,n,i,s){super.applyImportPhase(r,n,i,s),n?r.exportKind=i==="type"?"type":"value":r.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(r){if(this.match(133))return r.importKind="value",super.parseImport(r);let n;if(Ct(this.state.type)&&this.lookaheadCharCode()===61)return r.importKind="value",this.tsParseImportEqualsDeclaration(r);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(r,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(r,i);n=super.parseImportSpecifiersAndAfter(r,i)}else n=super.parseImport(r);return n.importKind==="type"&&n.specifiers.length>1&&n.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(Se.TypeImportCannotSpecifyDefaultAndNamed,n),n}parseExport(r,n){if(this.match(83)){this.next();let i=r,s=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(i,!1):i.importKind="value",this.tsParseImportEqualsDeclaration(i,s,!0)}else if(this.eat(29)){let i=r;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=r;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(r,n)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let r=this.startNode();return this.next(),r.abstract=!0,this.parseClass(r,!0,!0)}if(this.match(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseExportDefaultExpression()}parseVarStatement(r,n,i=!1){let{isAmbientContext:s}=this.state,o=super.parseVarStatement(r,n,i||s);if(!s)return o;for(let{id:a,init:c}of o.declarations)c&&(n!=="const"||a.typeAnnotation?this.raise(Se.InitializerNotAllowedInAmbientContext,c):Zce(c,this.hasPlugin("estree"))||this.raise(Se.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,c));return o}parseStatementContent(r,n){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(r,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(r,n){return n.some(i=>QB(i)?r.accessibility===i:!!r[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(r,n,i){let s=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:s,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Se.InvalidModifierOnTypeParameterPositions},n);let o=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(n,s)&&this.raise(Se.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(r,n)):this.parseClassMemberWithIsStatic(r,n,i,!!n.static)};n.declare?this.tsInAmbientContext(o):o()}parseClassMemberWithIsStatic(r,n,i,s){let o=this.tsTryParseIndexSignature(n);if(o){r.body.push(o),n.abstract&&this.raise(Se.IndexSignatureHasAbstract,n),n.accessibility&&this.raise(Se.IndexSignatureHasAccessibility,n,{modifier:n.accessibility}),n.declare&&this.raise(Se.IndexSignatureHasDeclare,n),n.override&&this.raise(Se.IndexSignatureHasOverride,n);return}!this.state.inAbstractClass&&n.abstract&&this.raise(Se.NonAbstractClassHasAbstractMethod,n),n.override&&(i.hadSuperClass||this.raise(Se.OverrideNotInSubClass,n)),super.parseClassMemberWithIsStatic(r,n,i,s)}parsePostMemberNameModifiers(r){this.eat(17)&&(r.optional=!0),r.readonly&&this.match(10)&&this.raise(Se.ClassMethodHasReadonly,r),r.declare&&this.match(10)&&this.raise(Se.ClassMethodHasDeclare,r)}parseExpressionStatement(r,n,i){return(n.type==="Identifier"?this.tsParseExpressionStatement(r,n,i):void 0)||super.parseExpressionStatement(r,n,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(r,n,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(r,n,i);let s=this.tryParse(()=>super.parseConditional(r,n));return s.node?(s.error&&(this.state=s.failState),s.node):(s.error&&super.setOptionalParametersError(i,s.error),r)}parseParenItem(r,n){let i=super.parseParenItem(r,n);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){let s=this.startNodeAt(n);return s.expression=r,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return r}parseExportDeclaration(r){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(r));let n=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(Se.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let o=Ct(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(r);return o?((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration"||i)&&(r.exportKind="type"),i&&(this.resetStartLocation(o,n),o.declare=!0),o):null}parseClassId(r,n,i,s){if((!n||i)&&this.isContextual(113))return;super.parseClassId(r,n,i,r.declare?1024:8331);let o=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);o&&(r.typeParameters=o)}parseClassPropertyAnnotation(r){r.optional||(this.eat(35)?r.definite=!0:this.eat(17)&&(r.optional=!0));let n=this.tsTryParseTypeAnnotation();n&&(r.typeAnnotation=n)}parseClassProperty(r){if(this.parseClassPropertyAnnotation(r),this.state.isAmbientContext&&!(r.readonly&&!r.typeAnnotation)&&this.match(29)&&this.raise(Se.DeclareClassFieldHasInitializer,this.state.startLoc),r.abstract&&this.match(29)){let{key:n}=r;this.raise(Se.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:n.type==="Identifier"&&!r.computed?n.name:`[${this.input.slice(n.start,n.end)}]`})}return super.parseClassProperty(r)}parseClassPrivateProperty(r){return r.abstract&&this.raise(Se.PrivateElementHasAbstract,r),r.accessibility&&this.raise(Se.PrivateElementHasAccessibility,r,{modifier:r.accessibility}),this.parseClassPropertyAnnotation(r),super.parseClassPrivateProperty(r)}parseClassAccessorProperty(r){return this.parseClassPropertyAnnotation(r),r.optional&&this.raise(Se.AccessorCannotBeOptional,r),super.parseClassAccessorProperty(r)}pushClassMethod(r,n,i,s,o,a){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);c&&o&&this.raise(Se.ConstructorHasTypeParameters,c);let{declare:u=!1,kind:l}=n;u&&(l==="get"||l==="set")&&this.raise(Se.DeclareAccessor,n,{kind:l}),c&&(n.typeParameters=c),super.pushClassMethod(r,n,i,s,o,a)}pushClassPrivateMethod(r,n,i,s){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(n.typeParameters=o),super.pushClassPrivateMethod(r,n,i,s)}declareClassPrivateMethodInScope(r,n){r.type!=="TSDeclareMethod"&&(r.type==="MethodDefinition"&&!hasOwnProperty.call(r.value,"body")||super.declareClassPrivateMethodInScope(r,n))}parseClassSuper(r){super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(r.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(r,n,i,s,o,a,c){let u=this.tsTryParseTypeParameters(this.tsParseConstModifier);return u&&(r.typeParameters=u),super.parseObjPropValue(r,n,i,s,o,a,c)}parseFunctionParams(r,n){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(r.typeParameters=i),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),r.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(r.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(r.id.typeAnnotation=i,this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){return this.match(14)&&(r.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(r,n)}parseMaybeAssign(r,n){var i,s,o,a,c;let u,l,p;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(u=this.state.clone(),l=this.tryParse(()=>super.parseMaybeAssign(r,n),u),!l.error)return l.node;let{context:f}=this.state,g=f[f.length-1];(g===Mt.j_oTag||g===Mt.j_expr)&&f.pop()}if(!((i=l)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(r,n);(!u||u===this.state)&&(u=this.state.clone());let d,m=this.tryParse(f=>{var g,y;d=this.tsParseTypeParameters(this.tsParseConstModifier);let v=super.parseMaybeAssign(r,n);return(v.type!=="ArrowFunctionExpression"||(g=v.extra)!=null&&g.parenthesized)&&f(),((y=d)==null?void 0:y.params.length)!==0&&this.resetStartLocationFromNode(v,d),v.typeParameters=d,v},u);if(!m.error&&!m.aborted)return d&&this.reportReservedArrowTypeParam(d),m.node;if(!l&&(XB(!this.hasPlugin("jsx")),p=this.tryParse(()=>super.parseMaybeAssign(r,n),u),!p.error))return p.node;if((s=l)!=null&&s.node)return this.state=l.failState,l.node;if(m.node)return this.state=m.failState,d&&this.reportReservedArrowTypeParam(d),m.node;if((o=p)!=null&&o.node)return this.state=p.failState,p.node;throw((a=l)==null?void 0:a.error)||m.error||((c=p)==null?void 0:c.error)}reportReservedArrowTypeParam(r){var n;r.params.length===1&&!r.params[0].constraint&&!((n=r.extra)!=null&&n.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Se.ReservedArrowTypeParam,r)}parseMaybeUnary(r,n){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(i=>{let s=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),s});if(n.aborted)return;n.thrown||(n.error&&(this.state=n.failState),r.returnType=n.node)}return super.parseArrow(r)}parseAssignableListItemTypes(r,n){if(!(n&2))return r;this.eat(17)&&(r.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.resetEndLocation(r),r}isAssignable(r,n){switch(r.type){case"TSTypeCastExpression":return this.isAssignable(r.expression,n);case"TSParameterProperty":return!0;default:return super.isAssignable(r,n)}}toAssignable(r,n=!1){switch(r.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(r,n);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":n?this.expressionScope.recordArrowParameterBindingError(Se.UnexpectedTypeCastInParameter,r):this.raise(Se.UnexpectedTypeCastInParameter,r),this.toAssignable(r.expression,n);break;case"AssignmentExpression":!n&&r.left.type==="TSTypeCastExpression"&&(r.left=this.typeCastToParameter(r.left));default:super.toAssignable(r,n)}}toAssignableParenthesizedExpression(r,n){switch(r.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(r.expression,n);break;default:super.toAssignable(r,n)}}checkToRestConversion(r,n){switch(r.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(r.expression,!1);break;default:super.checkToRestConversion(r,n)}}isValidLVal(r,n,i){switch(r){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!n)&&["expression",!0];default:return super.isValidLVal(r,n,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(r){if(this.match(47)||this.match(51)){let n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(r);return i.typeParameters=n,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(r)}checkCommaAfterRest(r){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===r?(this.next(),!1):super.checkCommaAfterRest(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(r,n){let i=super.parseMaybeDefault(r,n);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(Se.TypeAnnotationAfterAssign,i.typeAnnotation),i}getTokenFromCode(r){if(this.state.inType){if(r===62){this.finishOp(48,1);return}if(r===60){this.finishOp(47,1);return}}super.getTokenFromCode(r)}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}toAssignableList(r,n,i){for(let s=0;s<r.length;s++){let o=r[s];o?.type==="TSTypeCastExpression"&&(r[s]=this.typeCastToParameter(o))}super.toAssignableList(r,n,i)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}shouldParseArrow(r){return this.match(14)?r.every(n=>this.isAssignable(n,!0)):super.shouldParseArrow(r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(r){if(this.match(47)||this.match(51)){let n=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());n&&(r.typeParameters=n)}return super.jsxParseOpeningElementAfterName(r)}getGetterSetterExpectedParamCount(r){let n=super.getGetterSetterExpectedParamCount(r),s=this.getObjectOrClassMethodParams(r)[0];return s&&this.isThisParam(s)?n+1:n}parseCatchClauseParam(){let r=super.parseCatchClauseParam(),n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n,this.resetEndLocation(r)),r}tsInAmbientContext(r){let{isAmbientContext:n,strict:i}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return r()}finally{this.state.isAmbientContext=n,this.state.strict=i}}parseClass(r,n,i){let s=this.state.inAbstractClass;this.state.inAbstractClass=!!r.abstract;try{return super.parseClass(r,n,i)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(r,n){if(this.match(80))return r.abstract=!0,this.maybeTakeDecorators(n,this.parseClass(r,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return r.abstract=!0,this.raise(Se.NonClassMethodPropertyHasAbstractModifer,r),this.tsParseInterfaceDeclaration(r)}else this.unexpected(null,80)}parseMethod(r,n,i,s,o,a,c){let u=super.parseMethod(r,n,i,s,o,a,c);if(u.abstract&&(this.hasPlugin("estree")?!!u.value.body:!!u.body)){let{key:p}=u;this.raise(Se.AbstractMethodHasImplementation,u,{methodName:p.type==="Identifier"&&!u.computed?p.name:`[${this.input.slice(p.start,p.end)}]`})}return u}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(r,n,i,s){return!n&&s?(this.parseTypeOnlyImportExportSpecifier(r,!1,i),this.finishNode(r,"ExportSpecifier")):(r.exportKind="value",super.parseExportSpecifier(r,n,i,s))}parseImportSpecifier(r,n,i,s,o){return!n&&s?(this.parseTypeOnlyImportExportSpecifier(r,!0,i),this.finishNode(r,"ImportSpecifier")):(r.importKind="value",super.parseImportSpecifier(r,n,i,s,i?4098:4096))}parseTypeOnlyImportExportSpecifier(r,n,i){let s=n?"imported":"local",o=n?"local":"exported",a=r[s],c,u=!1,l=!0,p=a.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let f=this.parseIdentifier();Cs(this.state.type)?(u=!0,a=m,c=n?this.parseIdentifier():this.parseModuleExportName(),l=!1):(c=f,l=!1)}else Cs(this.state.type)?(l=!1,c=n?this.parseIdentifier():this.parseModuleExportName()):(u=!0,a=m)}else Cs(this.state.type)&&(u=!0,n?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());u&&i&&this.raise(n?Se.TypeModifierIsUsedInTypeImports:Se.TypeModifierIsUsedInTypeExports,p),r[s]=a,r[o]=c;let d=n?"importKind":"exportKind";r[d]=u?"type":"value",l&&this.eatContextual(93)&&(r[o]=n?this.parseIdentifier():this.parseModuleExportName()),r[o]||(r[o]=Ho(r[s])),n&&this.checkIdentifier(r[o],u?4098:4096)}};function Qce(t){if(t.type!=="MemberExpression")return!1;let{computed:e,property:r}=t;return e&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:gM(t.object)}function Zce(t,e){var r;let{type:n}=t;if((r=t.extra)!=null&&r.parenthesized)return!1;if(e){if(n==="Literal"){let{value:i}=t;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(n==="StringLiteral"||n==="BooleanLiteral")return!0;return!!(hM(t,e)||eue(t,e)||n==="TemplateLiteral"&&t.expressions.length===0||Qce(t))}function hM(t,e){return e?t.type==="Literal"&&(typeof t.value=="number"||"bigint"in t):t.type==="NumericLiteral"||t.type==="BigIntLiteral"}function eue(t,e){if(t.type==="UnaryExpression"){let{operator:r,argument:n}=t;if(r==="-"&&hM(n,e))return!0}return!1}function gM(t){return t.type==="Identifier"?!0:t.type!=="MemberExpression"||t.computed?!1:gM(t.object)}var ZB=Vo`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),tue=t=>class extends t{parsePlaceholder(r){if(this.match(144)){let n=this.startNode();return this.next(),this.assertNoSpace(),n.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(n,r)}}finishPlaceholder(r,n){let i=r;return(!i.expectedNode||!i.type)&&(i=this.finishNode(i,"Placeholder")),i.expectedNode=n,i}getTokenFromCode(r){r===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(r)}parseExprAtom(r){return this.parsePlaceholder("Expression")||super.parseExprAtom(r)}parseIdentifier(r){return this.parsePlaceholder("Identifier")||super.parseIdentifier(r)}checkReservedWord(r,n,i,s){r!==void 0&&super.checkReservedWord(r,n,i,s)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(r,n,i){return r==="Placeholder"||super.isValidLVal(r,n,i)}toAssignable(r,n){r&&r.type==="Placeholder"&&r.expectedNode==="Expression"?r.expectedNode="Pattern":super.toAssignable(r,n)}chStartsBindingIdentifier(r,n){return!!(super.chStartsBindingIdentifier(r,n)||this.lookahead().type===144)}verifyBreakContinue(r,n){r.label&&r.label.type==="Placeholder"||super.verifyBreakContinue(r,n)}parseExpressionStatement(r,n){var i;if(n.type!=="Placeholder"||(i=n.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(r,n);if(this.match(14)){let o=r;return o.label=this.finishPlaceholder(n,"Identifier"),this.next(),o.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(o,"LabeledStatement")}this.semicolon();let s=r;return s.name=n.name,this.finishPlaceholder(s,"Statement")}parseBlock(r,n,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(r,n,i)}parseFunctionId(r){return this.parsePlaceholder("Identifier")||super.parseFunctionId(r)}parseClass(r,n,i){let s=n?"ClassDeclaration":"ClassExpression";this.next();let o=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(81)||this.match(144)||this.match(5))r.id=a;else{if(i||!n)return r.id=null,r.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(r,s);throw this.raise(ZB.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(r,n,i);return super.parseClassSuper(r),r.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!r.superClass,o),this.finishNode(r,s)}parseExport(r,n){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(r,n);let s=r;if(!this.isContextual(98)&&!this.match(12))return s.specifiers=[],s.source=null,s.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(s,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let o=this.startNode();return o.exported=i,s.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],super.parseExport(s,n)}isExportDefaultSpecifier(){if(this.match(65)){let r=this.nextTokenStart();if(this.isUnparsedContextual(r,"from")&&this.input.startsWith(_a(144),this.nextTokenStartSince(r+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(r,n){var i;return(i=r.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(r,n)}checkExport(r){let{specifiers:n}=r;n!=null&&n.length&&(r.specifiers=n.filter(i=>i.exported.type==="Placeholder")),super.checkExport(r),r.specifiers=n}parseImport(r){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseImport(r);if(r.specifiers=[],!this.isContextual(98)&&!this.match(12))return r.source=this.finishPlaceholder(n,"StringLiteral"),this.semicolon(),this.finishNode(r,"ImportDeclaration");let i=this.startNodeAtNode(n);return i.local=n,r.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(r)||this.parseNamedImportSpecifiers(r)),this.expectContextual(98),r.source=this.parseImportSource(),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(ZB.UnexpectedSpace,this.state.lastTokEndLoc)}},rue=t=>class extends t{parseV8Intrinsic(){if(this.match(54)){let r=this.state.startLoc,n=this.startNode();if(this.next(),Ct(this.state.type)){let i=this.parseIdentifierName(),s=this.createIdentifier(n,i);if(s.type="V8IntrinsicIdentifier",this.match(10))return s}this.unexpected(r)}}parseExprAtom(r){return this.parseV8Intrinsic()||super.parseExprAtom(r)}},eM=["minimal","fsharp","hack","smart"],tM=["^^","@@","^","%","#"];function nue(t){if(t.has("decorators")){if(t.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let r=t.get("decorators").decoratorsBeforeExport;if(r!=null&&typeof r!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let n=t.get("decorators").allowCallParenthesized;if(n!=null&&typeof n!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(t.has("flow")&&t.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(t.has("placeholders")&&t.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(t.has("pipelineOperator")){var e;let r=t.get("pipelineOperator").proposal;if(!eM.includes(r)){let i=eM.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${i}.`)}let n=((e=t.get("recordAndTuple"))==null?void 0:e.syntaxType)==="hash";if(r==="hack"){if(t.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(t.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let i=t.get("pipelineOperator").topicToken;if(!tM.includes(i)){let s=tM.map(o=>`"${o}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${s}.`)}if(i==="#"&&n)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}else if(r==="smart"&&n)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}if(t.has("moduleAttributes")){if(t.has("importAttributes")||t.has("importAssertions"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(t.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(t.has("importAttributes")&&t.has("importAssertions"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(t.has("recordAndTuple")){let r=t.get("recordAndTuple").syntaxType;if(r!=null){let n=["hash","bar"];if(!n.includes(r))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+n.map(i=>`'${i}'`).join(", "))}}if(t.has("asyncDoExpressions")&&!t.has("doExpressions")){let r=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw r.missingPlugins="doExpressions",r}if(t.has("optionalChainingAssign")&&t.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var yM={estree:sce,jsx:Kce,flow:Vce,typescript:Xce,v8intrinsic:rue,placeholders:tue},iue=Object.keys(yM),FE={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function sue(t){if(t==null)return Object.assign({},FE);if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let e={};for(let n of Object.keys(FE)){var r;e[n]=(r=t[n])!=null?r:FE[n]}return e}var XE=class extends YE{checkProto(e,r,n,i){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return;let s=e.key;if((s.type==="Identifier"?s.name:s.value)==="__proto__"){if(r){this.raise(B.RecordNoProto,s);return}n.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=s.loc.start):this.raise(B.DuplicateProto,s)),n.used=!0}}shouldExitDescending(e,r){return e.type==="ArrowFunctionExpression"&&e.start===r}getExpression(){this.enterInitialScopes(),this.nextToken();let e=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.options.tokens&&(e.tokens=this.tokens),e}parseExpression(e,r){return e?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(e){let r=this.state.startLoc,n=this.parseMaybeAssign(e);if(this.match(12)){let i=this.startNodeAt(r);for(i.expressions=[n];this.eat(12);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(e,r){return this.disallowInAnd(()=>this.parseMaybeAssign(e,r))}parseMaybeAssignAllowIn(e,r){return this.allowInAnd(()=>this.parseMaybeAssign(e,r))}setOptionalParametersError(e,r){var n;e.optionalParametersLoc=(n=r?.loc)!=null?n:this.state.startLoc}parseMaybeAssign(e,r){let n=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let a=this.parseYield();return r&&(a=r.call(this,a,n)),a}let i;e?i=!1:(e=new Gl,i=!0);let{type:s}=this.state;(s===10||Ct(s))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(e);if(r&&(o=r.call(this,o,n)),lce(this.state.type)){let a=this.startNodeAt(n),c=this.state.value;if(a.operator=c,this.match(29)){this.toAssignable(o,!0),a.left=o;let u=n.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=u&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=u&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else a.left=o;return this.next(),a.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(a,"AssignmentExpression")),a}else i&&this.checkExpressionErrors(e,!0);return o}parseMaybeConditional(e){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprOps(e);return this.shouldExitDescending(i,n)?i:this.parseConditional(i,r,e)}parseConditional(e,r,n){if(this.eat(17)){let i=this.startNodeAt(r);return i.test=e,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(i,n)?i:this.parseExprOp(i,r,-1)}parseExprOp(e,r,n){if(this.isPrivateName(e)){let s=this.getPrivateNameSV(e);(n>=iy(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(B.PrivateInExpectedIn,e,{identifierName:s}),this.classScope.usePrivateName(s,e.loc.start)}let i=this.state.type;if(dce(i)&&(this.prodParam.hasIn||!this.match(58))){let s=iy(i);if(s>n){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,r)}let o=this.startNodeAt(r);o.left=e,o.operator=this.state.value;let a=i===41||i===42,c=i===40;if(c&&(s=iy(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(B.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);o.right=this.parseExprOpRightExpr(i,s);let u=this.finishNode(o,a||c?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(c&&(l===41||l===42)||a&&l===40)throw this.raise(B.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(u,r,n)}}return e}parseExprOpRightExpr(e,r){let n=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(B.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,r),n)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}default:return this.parseExprOpBaseRightExpr(e,r)}}parseExprOpBaseRightExpr(e,r){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,yce(e)?r-1:r)}parseHackPipeBody(){var e;let{startLoc:r}=this.state,n=this.parseMaybeAssign();return ece.has(n.type)&&!((e=n.extra)!=null&&e.parenthesized)&&this.raise(B.PipeUnparenthesizedBody,r,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(B.PipeTopicUnused,r),n}checkExponentialAfterUnary(e){this.match(57)&&this.raise(B.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,r){let n=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();let c=this.parseAwait(n);return r||this.checkExponentialAfterUnary(c),c}let s=this.match(34),o=this.startNode();if(mce(this.state.type)){o.operator=this.state.value,o.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let c=this.match(89);if(this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&c){let u=o.argument;u.type==="Identifier"?this.raise(B.StrictDelete,o):this.hasPropertyAsPrivateName(u)&&this.raise(B.DeletePrivateField,o)}if(!s)return r||this.checkExponentialAfterUnary(o),this.finishNode(o,"UnaryExpression")}let a=this.parseUpdate(o,s,e);if(i){let{type:c}=this.state;if((this.hasPlugin("v8intrinsic")?NE(c):NE(c)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(B.AwaitNotInAsyncContext,n),this.parseAwait(n)}return a}parseUpdate(e,r,n){if(r){let o=e;return this.checkLVal(o.argument,this.finishNode(o,"UpdateExpression")),e}let i=this.state.startLoc,s=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return s;for(;fce(this.state.type)&&!this.canInsertSemicolon();){let o=this.startNodeAt(i);o.operator=this.state.value,o.prefix=!1,o.argument=s,this.next(),this.checkLVal(s,s=this.finishNode(o,"UpdateExpression"))}return s}parseExprSubscripts(e){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return this.shouldExitDescending(i,n)?i:this.parseSubscripts(i,r)}parseSubscripts(e,r,n){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,r,n,i),i.maybeAsyncArrow=!1;while(!i.stop);return e}parseSubscript(e,r,n,i){let{type:s}=this.state;if(!n&&s===15)return this.parseBind(e,r,n,i);if(ay(s))return this.parseTaggedTemplateExpression(e,r,i);let o=!1;if(s===18){if(n&&(this.raise(B.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,e;i.optionalChainMember=o=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,r,i,o);{let a=this.eat(0);return a||o||this.eat(16)?this.parseMember(e,r,i,a,o):(i.stop=!0,e)}}parseMember(e,r,n,i,s){let o=this.startNodeAt(r);return o.object=e,o.computed=i,i?(o.property=this.parseExpression(),this.expect(3)):this.match(138)?(e.type==="Super"&&this.raise(B.SuperPrivateField,r),this.classScope.usePrivateName(this.state.value,this.state.startLoc),o.property=this.parsePrivateName()):o.property=this.parseIdentifier(!0),n.optionalChainMember?(o.optional=s,this.finishNode(o,"OptionalMemberExpression")):this.finishNode(o,"MemberExpression")}parseBind(e,r,n,i){let s=this.startNodeAt(r);return s.object=e,this.next(),s.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),r,n)}parseCoverCallAndAsyncArrowHead(e,r,n,i){let s=this.state.maybeInArrowParameters,o=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(r);a.callee=e;let{maybeAsyncArrow:c,optionalChainMember:u}=n;c&&(this.expressionScope.enter(Mce()),o=new Gl),u&&(a.optional=i),i?a.arguments=this.parseCallExpressionArguments(11):a.arguments=this.parseCallExpressionArguments(11,e.type==="Import",e.type!=="Super",a,o);let l=this.finishCallExpression(a,u);return c&&this.shouldParseAsyncArrow()&&!i?(n.stop=!0,this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),l)):(c&&(this.checkExpressionErrors(o,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=s,l}toReferencedArguments(e,r){this.toReferencedListDeep(e.arguments,r)}parseTaggedTemplateExpression(e,r,n){let i=this.startNodeAt(r);return i.tag=e,i.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(B.OptionalChainingNoTemplate,r),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&e.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(e,r){if(e.callee.type==="Import")if(e.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),e.arguments.length===0||e.arguments.length>2)this.raise(B.ImportCallArity,e,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let n of e.arguments)n.type==="SpreadElement"&&this.raise(B.ImportCallSpreadArgument,n);return this.finishNode(e,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,r,n,i,s){let o=[],a=!0,c=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){r&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(B.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),i&&this.addTrailingCommaExtraToNode(i),this.next();break}o.push(this.parseExprListItem(!1,s,n))}return this.state.inFSharpPipelineDirectBody=c,o}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,r){var n;return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(e,r.arguments,!0,(n=r.extra)==null?void 0:n.trailingCommaLoc),r.innerComments&&Pf(e,r.innerComments),r.callee.trailingComments&&Pf(e,r.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let r,n=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(r):this.match(10)?this.options.createImportExpressions?this.parseImportCall(r):this.finishNode(r,"Import"):(this.raise(B.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let s=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(s)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{r=this.startNode(),this.next(),r.object=null;let s=r.callee=this.parseNoCallExpr();if(s.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(B.UnsupportedBind,s)}case 138:return this.raise(B.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.parseTopicReference(s);this.unexpected();break}case 47:{let s=this.input.codePointAt(this.nextTokenStart());Go(s)||s===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(Ct(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let s=this.state.potentialArrowAt===this.state.start,o=this.state.containsEsc,a=this.parseIdentifier();if(!o&&a.name==="async"&&!this.canInsertSemicolon()){let{type:c}=this.state;if(c===68)return this.resetPreviousNodeTrailingComments(a),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(a));if(Ct(c))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(a)):a;if(c===90)return this.resetPreviousNodeTrailingComments(a),this.parseDo(this.startNodeAtNode(a),!0)}return s&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(a),[a],!1)):a}else this.unexpected()}}parseTopicReferenceThenEqualsSign(e,r){let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=e,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=Rn(this.state.endLoc,-1),this.parseTopicReference(n);this.unexpected()}parseTopicReference(e){let r=this.startNode(),n=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(r,n,e,i)}finishTopicReference(e,r,n,i){if(this.testTopicReferenceConfiguration(n,r,i)){let s=n==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(n==="smart"?B.PrimaryTopicNotAllowed:B.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(e,s)}else throw this.raise(B.PipeTopicUnconfiguredToken,r,{token:_a(i)})}testTopicReferenceConfiguration(e,r,n){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:_a(n)}]);case"smart":return n===27;default:throw this.raise(B.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(sy(!0,this.prodParam.hasYield));let r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(B.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,r,!0)}parseDo(e,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),e.async=r,this.next();let n=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=n,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(B.SuperNotAllowed,e):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(B.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(B.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),r=this.startNodeAt(Rn(this.state.startLoc,1)),n=this.state.value;return this.next(),e.id=this.createIdentifier(r,n),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,r,"sent")}return this.parseFunction(e)}parseMetaProperty(e,r,n){e.meta=r;let i=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||i)&&this.raise(B.UnsupportedMetaProperty,e.property,{target:r.name,onlyValidPropertyName:n}),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){let r=this.createIdentifier(this.startNodeAtNode(e),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(B.ImportMetaOutsideModule,r),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let n=this.isContextual(105);if(n||this.unexpected(),this.expectPlugin(n?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(B.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),e.phase=n?"source":"defer",this.parseImportCall(e)}return this.parseMetaProperty(e,r,"meta")}parseLiteralAtNode(e,r,n){return this.addExtra(n,"rawValue",e),this.addExtra(n,"raw",this.input.slice(n.start,this.state.end)),n.value=e,this.next(),this.finishNode(n,r)}parseLiteral(e,r){let n=this.startNode();return this.parseLiteralAtNode(e,r,n)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let r=this.startNode();return this.addExtra(r,"raw",this.input.slice(r.start,this.state.end)),r.pattern=e.pattern,r.flags=e.flags,this.next(),this.finishNode(r,"RegExpLiteral")}parseBooleanLiteral(e){let r=this.startNode();return r.value=e,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let r=this.state.startLoc,n;this.next(),this.expressionScope.enter(Bce());let i=this.state.maybeInArrowParameters,s=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let o=this.state.startLoc,a=[],c=new Gl,u=!0,l,p;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,c.optionalParametersLoc===null?null:c.optionalParametersLoc),this.match(11)){p=this.state.startLoc;break}if(this.match(21)){let f=this.state.startLoc;if(l=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),f)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowIn(c,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=s;let m=this.startNodeAt(r);return e&&this.shouldParseArrow(a)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(c),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,a,!1),m):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),p&&this.unexpected(p),l&&this.unexpected(l),this.checkExpressionErrors(c,!0),this.toReferencedListDeep(a,!0),a.length>1?(n=this.startNodeAt(o),n.expressions=a,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,d)):n=a[0],this.wrapParenthesis(r,n))}wrapParenthesis(e,r){if(!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",e.index),this.takeSurroundingComments(r,e.index,this.state.lastTokEndLoc.index),r;let n=this.startNodeAt(e);return n.expression=r,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,r){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let n=this.parseMetaProperty(e,r,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(B.UnexpectedNewTarget,n),n}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let r=this.parseExprList(11);this.toReferencedList(r),e.arguments=r}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){let r=this.match(83),n=this.parseNoCallExpr();e.callee=n,r&&(n.type==="Import"||n.type==="ImportExpression")&&this.raise(B.ImportCallNotNewExpression,n)}parseTemplateElement(e){let{start:r,startLoc:n,end:i,value:s}=this.state,o=r+1,a=this.startNodeAt(Rn(n,1));s===null&&(e||this.raise(B.InvalidEscapeSequenceTemplate,Rn(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(24),u=c?-1:-2,l=i+u;a.value={raw:this.input.slice(o,l).replace(/\r\n?/g,`
|
|
1116
|
-
`),cooked:s===null?null:s.slice(1,u)},a.tail=c,this.next();let p=this.finishNode(a,"TemplateElement");return this.resetEndLocation(p,Rn(this.state.lastTokEndLoc,u)),p}parseTemplate(e){let r=this.startNode(),n=this.parseTemplateElement(e),i=[n],s=[];for(;!n.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(n=this.parseTemplateElement(e));return r.expressions=s,r.quasis=i,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,r,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=Object.create(null),a=!0,c=this.startNode();for(c.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(c);break}let l;r?l=this.parseBindingProperty():(l=this.parsePropertyDefinition(i),this.checkProto(l,n,o,i)),n&&!this.isObjectProperty(l)&&l.type!=="SpreadElement"&&this.raise(B.InvalidRecordProperty,l),l.shorthand&&this.addExtra(l,"shorthand",!0),c.properties.push(l)}this.next(),this.state.inFSharpPipelineDirectBody=s;let u="ObjectExpression";return r?u="ObjectPattern":n&&(u="RecordExpression"),this.finishNode(c,u)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(B.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());let n=this.startNode(),i=!1,s=!1,o;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(n.decorators=r,r=[]),n.method=!1,e&&(o=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let c=this.state.containsEsc;if(this.parsePropertyName(n,e),!a&&!c&&this.maybeAsyncOrAccessorProp(n)){let{key:u}=n,l=u.name;l==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),(l==="get"||l==="set")&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=l,this.match(55)&&(a=!0,this.raise(B.AccessorIsGenerator,this.state.curPosition(),{kind:l}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,o,a,i,!1,s,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var r;let n=this.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e);i.length!==n&&this.raise(e.kind==="get"?B.BadGetterArity:B.BadSetterArity,e),e.kind==="set"&&((r=i[i.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(B.BadSetterRestParameter,e)}parseObjectMethod(e,r,n,i,s){if(s){let o=this.parseMethod(e,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(o),o}if(n||r||this.match(10))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,r,n,!1,!1,"ObjectMethod")}parseObjectProperty(e,r,n,i){if(e.shorthand=!1,this.eat(14))return e.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(e,"ObjectProperty");if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),n)e.value=this.parseMaybeDefault(r,Ho(e.key));else if(this.match(29)){let s=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=s):this.raise(B.InvalidCoverInitializedName,s),e.value=this.parseMaybeDefault(r,Ho(e.key))}else e.value=Ho(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,r,n,i,s,o,a){let c=this.parseObjectMethod(e,n,i,s,o)||this.parseObjectProperty(e,r,s,a);return c||this.unexpected(),c}parsePropertyName(e,r){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:i}=this.state,s;if(Cs(n))s=this.parseIdentifier(!0);else switch(n){case 134:s=this.parseNumericLiteral(i);break;case 133:s=this.parseStringLiteral(i);break;case 135:s=this.parseBigIntLiteral(i);break;case 136:s=this.parseDecimalLiteral(i);break;case 138:{let o=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=o):this.raise(B.UnexpectedPrivateField,o),s=this.parsePrivateName();break}default:this.unexpected()}e.key=s,n!==138&&(e.computed=!1)}}initFunction(e,r){e.id=null,e.generator=!1,e.async=r}parseMethod(e,r,n,i,s,o,a=!1){this.initFunction(e,n),e.generator=r,this.scope.enter(18|(a?64:0)|(s?32:0)),this.prodParam.enter(sy(n,e.generator)),this.parseFunctionParams(e,i);let c=this.parseFunctionBodyAndFinish(e,o,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(e,r,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(e,!n,i,o),this.state.inFSharpPipelineDirectBody=s,this.finishNode(o,n?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,r,n,i){this.scope.enter(6);let s=sy(n,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(e,n);let o=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,r,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=o,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,r,n){this.toAssignableList(r,n,!1),e.params=r}parseFunctionBodyAndFinish(e,r,n=!1){return this.parseFunctionBody(e,!1,n),this.finishNode(e,r)}parseFunctionBody(e,r,n=!1){let i=r&&!this.match(5);if(this.expressionScope.enter(fM()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,r,!1);else{let s=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,a=>{let c=!this.isSimpleParamList(e.params);a&&c&&this.raise(B.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);let u=!s&&this.state.strict;this.checkParams(e,!this.state.strict&&!r&&!n&&!c,r,u),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,u)}),this.prodParam.exit(),this.state.labels=o}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let r=0,n=e.length;r<n;r++)if(!this.isSimpleParameter(e[r]))return!1;return!0}checkParams(e,r,n,i=!0){let s=!r&&new Set,o={type:"FormalParameters"};for(let a of e.params)this.checkLVal(a,o,5,s,i)}parseExprList(e,r,n,i){let s=[],o=!0;for(;!this.eat(e);){if(o)o=!1;else if(this.expect(12),this.match(e)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}s.push(this.parseExprListItem(r,n))}return s}parseExprListItem(e,r,n){let i;if(this.match(12))e||this.raise(B.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(r),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(B.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(r,this.parseParenItem);return i}parseIdentifier(e){let r=this.startNode(),n=this.parseIdentifierName(e);return this.createIdentifier(r,n)}createIdentifier(e,r){return e.name=r,e.loc.identifierName=r,this.finishNode(e,"Identifier")}parseIdentifierName(e){let r,{startLoc:n,type:i}=this.state;Cs(i)?r=this.state.value:this.unexpected();let s=cce(i);return e?s&&this.replaceToken(132):this.checkReservedWord(r,n,s,!1),this.next(),r}checkReservedWord(e,r,n,i){if(e.length>10||!Pce(e))return;if(n&&wce(e)){this.raise(B.UnexpectedKeyword,r,{keyword:e});return}if((this.state.strict?i?uM:aM:oM)(e,this.inModule)){this.raise(B.UnexpectedReservedWord,r,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(B.YieldBindingIdentifier,r);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(B.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(B.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(B.ArgumentsInClass,r);return}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let r=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(B.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(B.ObsoleteAwaitStar,r),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||ay(e)||e===102&&!this.state.containsEsc||e===137||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(){let e=this.startNode();this.expressionScope.recordParameterInitializerError(B.YieldInParameter,e),this.next();let r=!1,n=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:n=this.parseMaybeAssign()}return e.delegate=r,e.argument=n,this.finishNode(e,"YieldExpression")}parseImportCall(e){return this.next(),e.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(e.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(e.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise(B.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(e,r){if(this.isSimpleReference(e)){let n=this.startNodeAt(r);return n.callee=e,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),n.expression=e,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(B.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(B.PipelineTopicUnused,e)}withTopicBindingContext(e){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}else return e()}withSoloAwaitPermittingContext(e){let r=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=r}}allowInAnd(e){let r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,e);return this.state.inFSharpPipelineDirectBody=n,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let r=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(r,8,"module")}finally{n()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}},kE={kind:1},oue={kind:2},aue=/[\uD800-\uDFFF]/u,IE=/in(?:stanceof)?/y;function cue(t,e){for(let r=0;r<t.length;r++){let n=t[r],{type:i}=n;if(typeof i=="number"){{if(i===138){let{loc:s,start:o,value:a,end:c}=n,u=o+1,l=Rn(s.start,1);t.splice(r,1,new to({type:qo(27),value:"#",start:o,end:u,startLoc:s.start,endLoc:l}),new to({type:qo(132),value:a,start:u,end:c,startLoc:l,endLoc:s.end})),r++;continue}if(ay(i)){let{loc:s,start:o,value:a,end:c}=n,u=o+1,l=Rn(s.start,1),p;e.charCodeAt(o)===96?p=new to({type:qo(22),value:"`",start:o,end:u,startLoc:s.start,endLoc:l}):p=new to({type:qo(8),value:"}",start:o,end:u,startLoc:s.start,endLoc:l});let d,m,f,g;i===24?(m=c-1,f=Rn(s.end,-1),d=a===null?null:a.slice(1,-1),g=new to({type:qo(22),value:"`",start:m,end:c,startLoc:f,endLoc:s.end})):(m=c-2,f=Rn(s.end,-2),d=a===null?null:a.slice(1,-2),g=new to({type:qo(23),value:"${",start:m,end:c,startLoc:f,endLoc:s.end})),t.splice(r,1,p,new to({type:qo(20),value:d,start:u,end:m,startLoc:l,endLoc:f}),g),r+=2;continue}}n.type=qo(i)}}return t}var QE=class extends XE{parseTopLevel(e,r){return e.program=this.parseProgram(r),e.comments=this.comments,this.options.tokens&&(e.tokens=cue(this.tokens,this.input)),this.finishNode(e,"File")}parseProgram(e,r=139,n=this.options.sourceType){if(e.sourceType=n,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,r),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[s,o]of Array.from(this.scope.undefinedExports))this.raise(B.ModuleExportUndefined,o,{localName:s});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return r===139?i=this.finishNode(e,"Program"):i=this.finishNodeAt(e,"Program",Rn(this.state.startLoc,-1)),i}stmtToDirective(e){let r=e;r.type="Directive",r.value=r.expression,delete r.expression;let n=r.value,i=n.value,s=this.input.slice(n.start,n.end),o=n.value=s.slice(1,-1);return this.addExtra(n,"raw",s),this.addExtra(n,"rawValue",o),this.addExtra(n,"expressionValue",i),n.type="DirectiveLiteral",r}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(e,r){if(Go(e)){if(IE.lastIndex=r,IE.test(this.input)){let n=this.codePointAtPos(IE.lastIndex);if(!ql(n)&&n!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),r=this.codePointAtPos(e);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);return r===123||this.chStartsBindingIdentifier(r,e)}startsUsingForOf(){let{type:e,containsEsc:r}=this.lookahead();if(e===102&&!r)return!1;if(Ct(e)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let r=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(r,e))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,e&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(e,r)}parseStatementContent(e,r){let n=this.state.type,i=this.startNode(),s=!!(e&2),o=!!(e&4),a=e&1;switch(n){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return o||this.raise(this.state.strict?B.StrictFunction:this.options.annexB?B.SloppyFunctionAnnexB:B.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!s&&o);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?s||this.raise(B.UnexpectedLexicalDeclaration,i):this.raise(B.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(B.UnexpectedUsingDeclaration,this.state.startLoc):s||this.raise(B.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let l=this.nextTokenStart(),p=this.codePointAtPos(l);if(p!==91&&(!s&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,l)&&p!==123))break}case 75:s||this.raise(B.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let l=this.state.value;return this.parseVarStatement(i,l)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let l=this.lookaheadCharCode();if(l===40||l===46)break}case 82:{!this.options.allowImportExportEverywhere&&!a&&this.raise(B.UnexpectedImportExport,this.state.startLoc),this.next();let l;return n===83?(l=this.parseImport(i),l.type==="ImportDeclaration"&&(!l.importKind||l.importKind==="value")&&(this.sawUnambiguousESM=!0)):(l=this.parseExport(i,r),(l.type==="ExportNamedDeclaration"&&(!l.exportKind||l.exportKind==="value")||l.type==="ExportAllDeclaration"&&(!l.exportKind||l.exportKind==="value")||l.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(l),l}default:if(this.isAsyncFunction())return s||this.raise(B.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!s&&o)}let c=this.state.value,u=this.parseExpression();return Ct(n)&&u.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,c,u,e):this.parseExpressionStatement(i,u,r)}assertModuleNodeAllowed(e){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(B.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,r,n){return e&&(r.decorators&&r.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(B.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...e)):r.decorators=e,this.resetStartLocationFromNode(r,e[0]),n&&this.resetStartLocationFromNode(n,r)),r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(B.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(B.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let r=this.state.startLoc,n;if(this.match(10)){let i=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(i,n);let s=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(n),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==n&&this.raise(B.DecoratorArgumentsOutsideParentheses,s)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(r);i.object=n,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,n=this.finishNode(i,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(n)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(10)){let r=this.startNodeAtNode(e);return r.callee=e,r.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return e}parseBreakContinueStatement(e,r){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,r),this.finishNode(e,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,r){let n;for(n=0;n<this.state.labels.length;++n){let i=this.state.labels[n];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind===1)||e.label&&r))break}if(n===this.state.labels.length){let i=r?"BreakStatement":"ContinueStatement";this.raise(B.IllegalBreakContinue,e,{type:i})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(kE),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(kE);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(e,null);let n=this.isContextual(100);{let c=this.isContextual(96)&&this.startsAwaitUsing(),u=c||this.isContextual(107)&&this.startsUsingForOf(),l=n&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||l){let p=this.startNode(),d;c?(d="await using",this.recordAwaitIfAllowed()||this.raise(B.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(p,!0,d);let m=this.finishNode(p,"VariableDeclaration"),f=this.match(58);return f&&u&&this.raise(B.ForInUsing,m),(f||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(e,m,r):(r!==null&&this.unexpected(r),this.parseFor(e,m))}}let i=this.isContextual(95),s=new Gl,o=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(n&&this.raise(B.ForOfLet,o),r===null&&i&&o.type==="Identifier"&&this.raise(B.ForOfAsync,o)),a||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(o,!0);let c=a?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{type:c}),this.parseForIn(e,o,r)}else this.checkExpressionErrors(s,!0);return r!==null&&this.unexpected(r),this.parseFor(e,o)}parseFunctionStatement(e,r,n){return this.next(),this.parseFunction(e,1|(n?2:0)|(r?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(B.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let r=e.cases=[];this.expect(5),this.state.labels.push(oue),this.scope.enter(0);let n;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let s=this.match(61);n&&this.finishNode(n,"SwitchCase"),r.push(n=this.startNode()),n.consequent=[],this.next(),s?n.test=this.parseExpression():(i&&this.raise(B.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(B.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(B.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,r,n=!1){return this.next(),this.parseVar(e,!1,r,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(kE),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(B.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,r,n,i){for(let o of this.state.labels)o.name===r&&this.raise(B.LabelRedeclaration,n,{labelName:r});let s=pce(this.state.type)?1:this.match(71)?2:null;for(let o=this.state.labels.length-1;o>=0;o--){let a=this.state.labels[o];if(a.statementStart===e.start)a.statementStart=this.state.start,a.kind=s;else break}return this.state.labels.push({name:r,kind:s,statementStart:this.state.start}),e.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,r,n){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,r=!0,n){let i=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(i,e,!1,8,n),r&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,r,n,i,s){let o=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(o,r?a:void 0,n,i,s)}parseBlockOrModuleBlockBody(e,r,n,i,s){let o=this.state.strict,a=!1,c=!1;for(;!this.match(i);){let u=n?this.parseModuleItem():this.parseStatementListItem();if(r&&!c){if(this.isValidDirective(u)){let l=this.stmtToDirective(u);r.push(l),!a&&l.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}e.push(u)}s?.call(this,a),o||this.setStrict(!1),this.next()}parseFor(e,r){return e.init=r,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,r,n){let i=this.match(58);return this.next(),i?n!==null&&this.unexpected(n):e.await=n!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(B.ForInOfLoopInitializer,r,{type:i?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(B.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),e.left=r,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}parseVar(e,r,n,i=!1){let s=e.declarations=[];for(e.kind=n;;){let o=this.startNode();if(this.parseVarId(o,n),o.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,o.init===null&&!i&&(o.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(B.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(B.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),s.push(this.finishNode(o,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,r){let n=this.parseBindingAtom();(r==="using"||r==="await using")&&(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise(B.UsingDeclarationHasBindingPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},r==="var"?5:8201),e.id=n}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,r=0){let n=r&2,i=!!(r&1),s=i&&!(r&4),o=!!(r&8);this.initFunction(e,o),this.match(55)&&(n&&this.raise(B.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(s));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(sy(o,e.generator)),i||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!n&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||Ct(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,r){this.expect(10),this.expressionScope.enter(Oce()),e.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,r,n){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(e,r,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,i),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,r){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:e},i=[],s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(B.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let o=this.startNode();i.length&&(o.decorators=i,this.resetStartLocationFromNode(o,i[0]),i=[]),this.parseClassMember(s,o,n),o.kind==="constructor"&&o.decorators&&o.decorators.length>0&&this.raise(B.DecoratorConstructor,o)}}),this.state.strict=r,this.next(),i.length)throw this.raise(B.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(e,r){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let i=r;return i.kind="method",i.computed=!1,i.key=n,i.static=!1,this.pushClassMethod(e,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=r;return i.computed=!1,i.key=n,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(e,r,n){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(e,r))return;if(this.eat(5)){this.parseClassStaticBlock(e,r);return}}this.parseClassMemberWithIsStatic(e,r,n,i)}parseClassMemberWithIsStatic(e,r,n,i){let s=r,o=r,a=r,c=r,u=r,l=s,p=s;if(r.static=i,this.parsePropertyNamePrefixOperator(r),this.eat(55)){l.kind="method";let v=this.match(138);if(this.parseClassElementName(l),v){this.pushClassPrivateMethod(e,o,!0,!1);return}this.isNonstaticConstructor(s)&&this.raise(B.ConstructorIsGenerator,s.key),this.pushClassMethod(e,s,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&Ct(this.state.type),m=this.parseClassElementName(r),f=d?m.name:null,g=this.isPrivateName(m),y=this.state.startLoc;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(l.kind="method",g){this.pushClassPrivateMethod(e,o,!1,!1);return}let v=this.isNonstaticConstructor(s),D=!1;v&&(s.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(B.DuplicateConstructor,m),v&&this.hasPlugin("typescript")&&r.override&&this.raise(B.OverrideOnConstructor,m),n.hadConstructor=!0,D=n.hadSuperClass),this.pushClassMethod(e,s,!1,!1,v,D)}else if(this.isClassProperty())g?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,a);else if(f==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);let v=this.eat(55);p.optional&&this.unexpected(y),l.kind="method";let D=this.match(138);this.parseClassElementName(l),this.parsePostMemberNameModifiers(p),D?this.pushClassPrivateMethod(e,o,v,!0):(this.isNonstaticConstructor(s)&&this.raise(B.ConstructorIsAsync,s.key),this.pushClassMethod(e,s,v,!0,!1,!1))}else if((f==="get"||f==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),l.kind=f;let v=this.match(138);this.parseClassElementName(s),v?this.pushClassPrivateMethod(e,o,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(B.ConstructorIsAccessor,s.key),this.pushClassMethod(e,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else if(f==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);let v=this.match(138);this.parseClassElementName(a),this.pushClassAccessorProperty(e,u,v)}else this.isLineTerminator()?g?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,a):this.unexpected()}parseClassElementName(e){let{type:r,value:n}=this.state;if((r===132||r===133)&&e.static&&n==="prototype"&&this.raise(B.StaticPrototype,this.state.startLoc),r===138){n==="constructor"&&this.raise(B.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return e.key=i,i}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,r){var n;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let s=r.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,e.body.push(this.finishNode(r,"StaticBlock")),(n=r.decorators)!=null&&n.length&&this.raise(B.DecoratorStaticBlock,r)}pushClassProperty(e,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(B.ConstructorClassField,r.key),e.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(e,r){let n=this.parseClassPrivateProperty(r);e.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(e,r,n){!n&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(B.ConstructorClassField,r.key);let i=this.parseClassAccessorProperty(r);e.body.push(i),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(e,r,n,i,s,o){e.body.push(this.parseMethod(r,n,i,s,o,"ClassMethod",!0))}pushClassPrivateMethod(e,r,n,i){let s=this.parseMethod(r,n,i,!1,!1,"ClassPrivateMethod",!0);e.body.push(s);let o=s.kind==="get"?s.static?6:2:s.kind==="set"?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,o)}declareClassPrivateMethodInScope(e,r){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),r,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(fM()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,r,n,i=8331){if(Ct(this.state.type))e.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(e.id,i);else if(n||!r)e.id=null;else throw this.raise(B.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,r){let n=this.parseMaybeImportPhase(e,!0),i=this.maybeParseExportDefaultSpecifier(e,n),s=!i||this.eat(12),o=s&&this.eatExportStar(e),a=o&&this.maybeParseExportNamespaceSpecifier(e),c=s&&(!a||this.eat(12)),u=i||o;if(o&&!a){if(i&&this.unexpected(),r)throw this.raise(B.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}let l=this.maybeParseExportNamedSpecifiers(e);i&&s&&!o&&!l&&this.unexpected(null,5),a&&c&&this.unexpected(null,98);let p;if(u||l){if(p=!1,r)throw this.raise(B.UnsupportedDecoratorExport,e);this.parseExportFrom(e,u)}else p=this.maybeParseExportDeclaration(e);if(u||l||p){var d;let m=e;if(this.checkExport(m,!0,!1,!!m.source),((d=m.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(r,m.declaration,m);else if(r)throw this.raise(B.UnsupportedDecoratorExport,e);return this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=e,f=this.parseExportDefaultExpression();if(m.declaration=f,f.type==="ClassDeclaration")this.maybeTakeDecorators(r,f,m);else if(r)throw this.raise(B.UnsupportedDecoratorExport,e);return this.checkExport(m,!0,!0),this.finishNode(m,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r?.loc.start);let n=r||this.parseIdentifier(!0),i=this.startNodeAtNode(n);return i.exported=n,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var r,n;(n=(r=e).specifiers)!=null||(r.specifiers=[]);let i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let r=e;r.specifiers||(r.specifiers=[]);let n=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(n)),r.source=null,r.declaration=null,this.hasPlugin("importAssertions")&&(r.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(B.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(B.UnsupportedDefaultExport,this.state.startLoc);let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(Ct(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(Ct(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let r=this.nextTokenStart(),n=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||Ct(this.state.type)&&n)return!0;if(this.match(65)&&n){let i=this.input.charCodeAt(this.nextTokenStartSince(r+4));return i===34||i===39}return!1}parseExportFrom(e,r){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(B.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(B.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(B.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,r,n,i){if(r){var s;if(n){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var o;let a=e.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((o=a.extra)!=null&&o.parenthesized)&&this.raise(B.ExportDefaultFromAsIdentifier,a)}}else if((s=e.specifiers)!=null&&s.length)for(let a of e.specifiers){let{exported:c}=a,u=c.type==="Identifier"?c.name:c.value;if(this.checkDuplicateExports(a,u),!i&&a.local){let{local:l}=a;l.type!=="Identifier"?this.raise(B.ExportBindingIsString,a,{localName:l.value,exportName:u}):(this.checkReservedWord(l.name,l.loc.start,!0,!1),this.scope.checkLocalExport(l))}}else if(e.declaration){let a=e.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:c}=a;if(!c)throw new Error("Assertion failure");this.checkDuplicateExports(e,c.name)}else if(a.type==="VariableDeclaration")for(let c of a.declarations)this.checkDeclaration(c.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let r of e.properties)this.checkDeclaration(r);else if(e.type==="ArrayPattern")for(let r of e.elements)r&&this.checkDeclaration(r);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(B.DuplicateDefaultExport,e):this.raise(B.DuplicateExport,e,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(e){let r=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),s=this.match(133),o=this.startNode();o.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(o,s,e,i))}return r}parseExportSpecifier(e,r,n,i){return this.eatContextual(93)?e.exported=this.parseModuleExportName():r?e.exported=$ce(e.local):e.exported||(e.exported=Ho(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let e=this.parseStringLiteral(this.state.value),r=aue.exec(e.value);return r&&this.raise(B.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:r[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:r,value:n})=>n.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(e){let{specifiers:r}=e,n=r.length===1?r[0].type:null;if(e.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise(B.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(e.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(B.DeferImportRequiresNamespace,r[0].loc.start);else if(e.module){var i;n!=="ImportDefaultSpecifier"&&this.raise(B.ImportReflectionNotBinding,r[0].loc.start),((i=e.assertions)==null?void 0:i.length)>0&&this.raise(B.ImportReflectionHasAssertion,r[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){let{specifiers:r}=e;if(r!=null){let n=r.find(i=>{let s;if(i.type==="ExportSpecifier"?s=i.local:i.type==="ImportSpecifier"&&(s=i.imported),s!==void 0)return s.type==="Identifier"?s.name!=="default":s.value!=="default"});n!==void 0&&this.raise(B.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,r,n,i){r||(n==="module"?(this.expectPlugin("importReflection",i),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",i),e.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",i),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(e,r,null),null;let n=this.parseIdentifier(!0),{type:i}=this.state;return(Cs(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(n),this.applyImportPhase(e,r,n.name,n.loc.start),null):(this.applyImportPhase(e,r,null),n)}isPrecedingIdImportPhase(e){let{type:r}=this.state;return Ct(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(e){return this.match(133)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,r){e.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(e,r)||this.eat(12),s=i&&this.maybeParseStarImportSpecifier(e);return i&&!s&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){var r;return(r=e.specifiers)!=null||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,r,n){r.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(r,n))}finishImportSpecifier(e,r,n=8201){return this.checkLVal(e.local,{type:r},n),this.finishNode(e,r)}parseImportAttributes(){this.expect(5);let e=[],r=new Set;do{if(this.match(8))break;let n=this.startNode(),i=this.state.value;if(r.has(i)&&this.raise(B.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),r.add(i),this.match(133)?n.key=this.parseStringLiteral(i):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(B.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],r=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise(B.ModuleAttributeDifferentFromType,n.key),r.has(n.key.name)&&this.raise(B.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),r.add(n.key.name),this.expect(14),!this.match(133))throw this.raise(B.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let r,n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?r=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),r=this.parseImportAttributes()),n=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(B.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(e,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),r=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))r=[];else if(this.hasPlugin("moduleAttributes"))r=[];else return;!n&&this.hasPlugin("importAssertions")?e.assertions=r:e.attributes=r}maybeParseDefaultImportSpecifier(e,r){if(r){let n=this.startNodeAtNode(r);return n.local=r,e.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(Cs(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(B.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),i=this.match(133),s=this.isContextual(130);n.imported=this.parseModuleExportName();let o=this.parseImportSpecifier(n,i,e.importKind==="type"||e.importKind==="typeof",s,void 0);e.specifiers.push(o)}}parseImportSpecifier(e,r,n,i,s){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:o}=e;if(r)throw this.raise(B.ImportBindingIsString,e,{importName:o.value});this.checkReservedWord(o.name,e.loc.start,!0,!0),e.local||(e.local=Ho(o))}return this.finishImportSpecifier(e,"ImportSpecifier",s)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},uy=class extends QE{constructor(e,r,n){e=sue(e),super(e,r),this.options=e,this.initializeScopes(),this.plugins=n,this.filename=e.sourceFilename}getScopeHandler(){return Tf}parse(){this.enterInitialScopes();let e=this.startNode(),r=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,r),e.errors=this.state.errors,e.comments.length=this.state.commentsLen,e}};function uue(t,e){var r;if(((r=e)==null?void 0:r.sourceType)==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let n=Cf(e,t),i=n.parse();if(n.sawUnambiguousESM)return i;if(n.ambiguousScriptDifferentAst)try{return e.sourceType="script",Cf(e,t).parse()}catch{}else i.program.sourceType="script";return i}catch(n){try{return e.sourceType="script",Cf(e,t).parse()}catch{}throw n}}else return Cf(e,t).parse()}function lue(t,e){let r=Cf(e,t);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function pue(t){let e={};for(let r of Object.keys(t))e[r]=qo(t[r]);return e}var due=pue(ace);function Cf(t,e){let r=uy,n=new Map;if(t!=null&&t.plugins){for(let i of t.plugins){let s,o;typeof i=="string"?s=i:[s,o]=i,n.has(s)||n.set(s,o||{})}nue(n),r=fue(n)}return new r(t,e,n)}var rM=new Map;function fue(t){let e=[];for(let i of iue)t.has(i)&&e.push(i);let r=e.join("|"),n=rM.get(r);if(!n){n=uy;for(let i of e)n=yM[i](n);rM.set(r,n)}return n}Af.parse=uue;Af.parseExpression=lue;Af.tokTypes=due});var PC={};Yh(PC,{MagicastError:()=>gn,builders:()=>zle,detectCodeFormat:()=>f3,generateCode:()=>TC,loadFile:()=>Ule,parseExpression:()=>h3,parseModule:()=>m3,writeFile:()=>qle});function Di(t){var e=t.use(br),r=e.Type,n=e.builtInTypes,i=n.number;function s(u){return r.from(l=>i.check(l)&&l>=u,i+" >= "+u)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var a=r.or(n.string,n.number,n.boolean,n.null,n.undefined);let c=r.from(u=>{if(u===null)return!0;var l=typeof u;return!(l==="object"||l==="function")},a.toString());return{geq:s,defaults:o,isPrimitive:c}}function Ut(t){try{var e=t(),r=e.exports,n=r.default}catch{return}n&&n!==r&&typeof r=="object"&&(Object.assign(n,r,{default:n}),r.__esModule&&Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n)}function DC(t){return Array.isArray(t)?"["+t.map(DC).join(", ")+"]":t&&typeof t=="object"?"{ "+Object.keys(t).map(function(e){return e+": "+t[e]}).join(", ")+" }":JSON.stringify(t)}function br(t){let e={or(...$){return new Cy($.map(H=>e.from(H)))},from($,H){if($ instanceof Mf||$ instanceof Dy||$ instanceof Ey||$ instanceof Cy||$ instanceof zc)return $;if($ instanceof Of)return $.type;if(a.check($)){if($.length!==1)throw new Error("only one element type is permitted for typed arrays");return new Mf(e.from($[0]))}if(c.check($))return new Ey(Object.keys($).map(le=>new wy(le,e.from($[le],le))));if(typeof $=="function"){var Z=r.indexOf($);if(Z>=0)return n[Z];if(typeof H!="string")throw new Error("missing name");return new zc(H,$)}return new Dy($)},def($){return Vi.call(v,$)?v[$]:v[$]=new E($)},hasDef($){return Vi.call(v,$)}};var r=[],n=[];function i($,H){let Z=xy.call(H),le=new zc($,pe=>xy.call(pe)===Z);return H&&typeof H.constructor=="function"&&(r.push(H.constructor),n.push(le)),le}let s=i("string","truthy"),o=i("function",function(){}),a=i("array",[]),c=i("object",{}),u=i("RegExp",/./),l=i("Date",new Date),p=i("number",3),d=i("boolean",!0),m=i("null",null),f=i("undefined",void 0),g=typeof BigInt=="function"?i("BigInt",BigInt(1234)):new zc("BigInt",()=>!1),y={string:s,function:o,array:a,object:c,RegExp:u,Date:l,number:p,boolean:d,null:m,undefined:f,BigInt:g};var v=Object.create(null);function D($){if($&&typeof $=="object"){var H=$.type;if(typeof H=="string"&&Vi.call(v,H)){var Z=v[H];if(Z.finalized)return Z}}return null}class E extends Of{constructor(H){super(new zc(H,(Z,le)=>this.check(Z,le)),H)}check(H,Z){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(H===null||typeof H!="object")return!1;var le=D(H);return le?Z&&le===this?this.checkAllFields(H,Z):this.isSupertypeOf(le)?Z?le.checkAllFields(H,Z)&&this.checkAllFields(H,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(H,Z):!1}build(...H){if(this.buildParams=H,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let Z=(pe,fe,oe,Ge)=>{if(!Vi.call(pe,fe)){var ct=this.allFields;if(!Vi.call(ct,fe))throw new Error(""+fe);var ue=ct[fe],Ee=ue.type,re;if(Ge)re=oe;else if(ue.defaultFn)re=ue.defaultFn.call(pe);else{var Re="no value or default function given for field "+JSON.stringify(fe)+" of "+this.typeName+"("+this.buildParams.map(function(ye){return ct[ye]}).join(", ")+")";throw new Error(Re)}if(!Ee.check(re))throw new Error(DC(re)+" does not match field "+ue+" of type "+this.typeName);pe[fe]=re}},le=(...pe)=>{var fe=pe.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var oe=Object.create(w);if(this.buildParams.forEach(function(Ge,ct){ct<fe?Z(oe,Ge,pe[ct],!0):Z(oe,Ge,null,!1)}),Object.keys(this.allFields).forEach(function(Ge){Z(oe,Ge,null,!1)}),oe.type!==this.typeName)throw new Error("");return oe};return le.from=pe=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var fe=Object.create(w);if(Object.keys(this.allFields).forEach(function(oe){Vi.call(pe,oe)?Z(fe,oe,pe[oe],!0):Z(fe,oe,null,!1)}),fe.type!==this.typeName)throw new Error("");return fe},Object.defineProperty(C,P(this.typeName),{enumerable:!0,value:le}),this}field(H,Z,le,pe){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(H)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[H]=new wy(H,e.from(Z),le,pe),this)}finalize(){if(!this.finalized){var H=this.allFields,Z=this.allSupertypes;this.baseNames.forEach(pe=>{var fe=v[pe];if(fe instanceof Of)fe.finalize(),G(H,fe.allFields),G(Z,fe.allSupertypes);else{var oe="unknown supertype name "+JSON.stringify(pe)+" for subtype "+JSON.stringify(this.typeName);throw new Error(oe)}}),G(H,this.ownFields),Z[this.typeName]=this,this.fieldNames.length=0;for(var le in H)Vi.call(H,le)&&!H[le].hidden&&this.fieldNames.push(le);Object.defineProperty(_,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,j(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&O(this.typeName)}}}function x($){if(!Vi.call(v,$))throw new Error("");var H=v[$];if(H.finalized!==!0)throw new Error("");return H.supertypeList.slice(1)}function b($){for(var H={},Z=Object.keys(v),le=Z.length,pe=0;pe<le;++pe){var fe=Z[pe],oe=v[fe];if(oe.finalized!==!0)throw new Error(""+fe);for(var Ge=0;Ge<oe.supertypeList.length;++Ge){var ct=oe.supertypeList[Ge];if(Vi.call($,ct)){H[fe]=ct;break}}}return H}var C=Object.create(null),w={};function F($,H){var Z=w[$];return f.check(H)?delete w[$]:(o.assert(H),Object.defineProperty(w,$,{enumerable:!0,configurable:!0,value:H})),Z}function P($){return $.replace(/^[A-Z]+/,function(H){var Z=H.length;switch(Z){case 0:return"";case 1:return H.toLowerCase();default:return H.slice(0,Z-1).toLowerCase()+H.charAt(Z-1)}})}function A($){return $=P($),$.replace(/(Expression)?$/,"Statement")}var _={};function z($){var H=D($);if(H)return H.fieldNames.slice(0);if("type"in $)throw new Error("did not recognize object of type "+JSON.stringify($.type));return Object.keys($)}function M($,H){var Z=D($);if(Z){var le=Z.allFields[H];if(le)return le.getValue($)}return $&&$[H]}function U($,H,Z){z($).forEach(function(le){H.call(this,le,M($,le))},Z)}function k($,H,Z){return z($).some(function(le){return H.call(this,le,M($,le))},Z)}function O($){var H=A($);if(C[H])return;var Z=C[P($)];if(!Z)return;let le=function(...pe){return C.expressionStatement(Z.apply(C,pe))};le.from=function(...pe){return C.expressionStatement(Z.from.apply(C,pe))},C[H]=le}function j($,H){H.length=0,H.push($);for(var Z=Object.create(null),le=0;le<H.length;++le){$=H[le];var pe=v[$];if(pe.finalized!==!0)throw new Error("");Vi.call(Z,$)&&delete H[Z[$]],Z[$]=le,H.push.apply(H,pe.baseNames)}for(var fe=0,oe=fe,Ge=H.length;oe<Ge;++oe)Vi.call(H,oe)&&(H[fe++]=H[oe]);H.length=fe}function G($,H){return Object.keys(H).forEach(function(Z){$[Z]=H[Z]}),$}function Q(){Object.keys(v).forEach(function($){v[$].finalize()})}return{Type:e,builtInTypes:y,getSupertypeNames:x,computeSupertypeLookupTable:b,builders:C,defineMethod:F,getBuilderName:P,getStatementBuilderName:A,namedTypes:_,getFieldNames:z,getFieldValue:M,eachField:U,someField:k,finalize:Q}}function OM(t){var e=t.use(br),r=e.builtInTypes.array,n=e.builtInTypes.number;let i=function p(d,m,f){if(!(this instanceof p))throw new Error("Path constructor cannot be invoked without 'new'");if(m){if(!(m instanceof p))throw new Error("")}else m=null,f=null;this.value=d,this.parentPath=m,this.name=f,this.__childCache=null};var s=i.prototype;function o(p){return p.__childCache||(p.__childCache=Object.create(null))}function a(p,d){var m=o(p),f=p.getValueProperty(d),g=m[d];return(!ly.call(m,d)||g.value!==f)&&(g=m[d]=new p.constructor(f,p,d)),g}s.getValueProperty=function(d){return this.value[d]},s.get=function(...d){for(var m=this,f=d.length,g=0;g<f;++g)m=a(m,d[g]);return m},s.each=function(d,m){for(var f=[],g=this.value.length,y=0,y=0;y<g;++y)ly.call(this.value,y)&&(f[y]=this.get(y));for(m=m||this,y=0;y<g;++y)ly.call(f,y)&&d.call(m,f[y])},s.map=function(d,m){var f=[];return this.each(function(g){f.push(d.call(this,g))},m),f},s.filter=function(d,m){var f=[];return this.each(function(g){d.call(this,g)&&f.push(g)},m),f};function c(){}function u(p,d,m,f){if(r.assert(p.value),d===0)return c;var g=p.value.length;if(g<1)return c;var y=arguments.length;y===2?(m=0,f=g):y===3?(m=Math.max(m,0),f=g):(m=Math.max(m,0),f=Math.min(f,g)),n.assert(m),n.assert(f);for(var v=Object.create(null),D=o(p),E=m;E<f;++E)if(ly.call(p.value,E)){var x=p.get(E);if(x.name!==E)throw new Error("");var b=E+d;x.name=b,v[b]=x,delete D[E]}return delete D.length,function(){for(var C in v){var w=v[C];if(w.name!==+C)throw new Error("");D[C]=w,p.value[C]=w.value}}}s.shift=function(){var d=u(this,-1),m=this.value.shift();return d(),m},s.unshift=function(...d){var m=u(this,d.length),f=this.value.unshift.apply(this.value,d);return m(),f},s.push=function(...d){return r.assert(this.value),delete o(this).length,this.value.push.apply(this.value,d)},s.pop=function(){r.assert(this.value);var d=o(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},s.insertAt=function(d){var m=arguments.length,f=u(this,m-1,d);if(f===c&&m<=1)return this;d=Math.max(d,0);for(var g=1;g<m;++g)this.value[d+g-1]=arguments[g];return f(),this},s.insertBefore=function(...d){for(var m=this.parentPath,f=d.length,g=[this.name],y=0;y<f;++y)g.push(d[y]);return m.insertAt.apply(m,g)},s.insertAfter=function(...d){for(var m=this.parentPath,f=d.length,g=[this.name+1],y=0;y<f;++y)g.push(d[y]);return m.insertAt.apply(m,g)};function l(p){if(!(p instanceof i))throw new Error("");var d=p.parentPath;if(!d)return p;var m=d.value,f=o(d);if(m[p.name]===p.value)f[p.name]=p;else if(r.check(m)){var g=m.indexOf(p.value);g>=0&&(f[p.name=g]=p)}else m[p.name]=p.value,f[p.name]=p;if(m[p.name]!==p.value)throw new Error("");if(p.parentPath.get(p.name)!==p)throw new Error("");return p}return s.replace=function(d){var m=[],f=this.parentPath.value,g=o(this.parentPath),y=arguments.length;if(l(this),r.check(f)){for(var v=f.length,D=u(this.parentPath,y-1,this.name+1),E=[this.name,1],x=0;x<y;++x)E.push(arguments[x]);var b=f.splice.apply(f,E);if(b[0]!==this.value)throw new Error("");if(f.length!==v-1+y)throw new Error("");if(D(),y===0)delete this.value,delete g[this.name],this.__childCache=null;else{if(f[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,this.__childCache=null),x=0;x<y;++x)m.push(this.parentPath.get(this.name+x));if(m[0]!==this)throw new Error("")}}else if(y===1)this.value!==d&&(this.__childCache=null),this.value=f[this.name]=d,m.push(this);else if(y===0)delete f[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return m},i}function yue(t){var e=t.use(br),r=e.Type,n=e.namedTypes,i=n.Node,s=n.Expression,o=e.builtInTypes.array,a=e.builders;let c=function x(b,C){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");l.check(b.value)||u.assert(b.value);var w;if(C){if(!(C instanceof x))throw new Error("");w=C.depth+1}else C=null,w=0;Object.defineProperties(this,{path:{value:b},node:{value:b.value},isGlobal:{value:!C,enumerable:!0},depth:{value:w},parent:{value:C},bindings:{value:{}},types:{value:{}}})};var u=r.or(n.Program,n.Function,n.CatchClause),l=r.or(n.Function,n.ClassDeclaration,n.ClassExpression,n.InterfaceDeclaration,n.TSInterfaceDeclaration,n.TypeAlias,n.TSTypeAliasDeclaration),p=r.or(n.TypeParameter,n.TSTypeParameter);c.isEstablishedBy=function(x){return u.check(x)||l.check(x)};var d=c.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Wl.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Wl.call(this.types,x)},d.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var b=0;this.declares(x+b);)++b;var C=x+b;return this.bindings[C]=e.builders.identifier(C)},d.injectTemporary=function(x,b){x||(x=this.declareTemporary());var C=this.path.get("body");return n.BlockStatement.check(C.value)&&(C=C.get("body")),C.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,b||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var b in this.bindings)delete this.bindings[b];for(var b in this.types)delete this.types[b];m(this.path,this.bindings,this.types),this.didScan=!0}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types};function m(x,b,C){var w=x.value;if(l.check(w)){let F=x.get("typeParameters","params");o.check(F.value)&&F.each(P=>{E(P,C)})}u.check(w)&&(n.CatchClause.check(w)?v(x.get("param"),b):f(x,b,C))}function f(x,b,C){var w=x.value;x.parent&&n.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&v(x.parent.get("id"),b),w&&(o.check(w)?x.each(F=>{y(F,b,C)}):n.Function.check(w)?(x.get("params").each(F=>{v(F,b)}),y(x.get("body"),b,C),f(x.get("typeParameters"),b,C)):n.TypeAlias&&n.TypeAlias.check(w)||n.InterfaceDeclaration&&n.InterfaceDeclaration.check(w)||n.TSTypeAliasDeclaration&&n.TSTypeAliasDeclaration.check(w)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(w)?D(x.get("id"),C):n.VariableDeclarator.check(w)?(v(x.get("id"),b),y(x.get("init"),b,C)):w.type==="ImportSpecifier"||w.type==="ImportNamespaceSpecifier"||w.type==="ImportDefaultSpecifier"?v(x.get(w.local?"local":w.name?"name":"id"),b):i.check(w)&&!s.check(w)&&e.eachField(w,function(F,P){var A=x.get(F);if(!g(A,P))throw new Error("");y(A,b,C)}))}function g(x,b){return!!(x.value===b||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(b)&&b.length===0)}function y(x,b,C){var w=x.value;if(!(!w||s.check(w)))if(n.FunctionDeclaration.check(w)&&w.id!==null)v(x.get("id"),b);else if(n.ClassDeclaration&&n.ClassDeclaration.check(w)&&w.id!==null)v(x.get("id"),b),f(x.get("typeParameters"),b,C);else if(n.InterfaceDeclaration&&n.InterfaceDeclaration.check(w)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(w))D(x.get("id"),C);else if(u.check(w)){if(n.CatchClause.check(w)&&n.Identifier.check(w.param)){var F=w.param.name,P=Wl.call(b,F);f(x.get("body"),b,C),P||delete b[F]}}else f(x,b,C)}function v(x,b){var C=x.value;n.Pattern.assert(C),n.Identifier.check(C)?Wl.call(b,C.name)?b[C.name].push(x):b[C.name]=[x]:n.AssignmentPattern&&n.AssignmentPattern.check(C)?v(x.get("left"),b):n.ObjectPattern&&n.ObjectPattern.check(C)?x.get("properties").each(function(w){var F=w.value;n.Pattern.check(F)?v(w,b):n.Property.check(F)||n.ObjectProperty&&n.ObjectProperty.check(F)?v(w.get("value"),b):n.SpreadProperty&&n.SpreadProperty.check(F)&&v(w.get("argument"),b)}):n.ArrayPattern&&n.ArrayPattern.check(C)?x.get("elements").each(function(w){var F=w.value;n.Pattern.check(F)?v(w,b):n.SpreadElement&&n.SpreadElement.check(F)&&v(w.get("argument"),b)}):n.PropertyPattern&&n.PropertyPattern.check(C)?v(x.get("pattern"),b):(n.SpreadElementPattern&&n.SpreadElementPattern.check(C)||n.RestElement&&n.RestElement.check(C)||n.SpreadPropertyPattern&&n.SpreadPropertyPattern.check(C))&&v(x.get("argument"),b)}function D(x,b){var C=x.value;n.Pattern.assert(C),n.Identifier.check(C)&&(Wl.call(b,C.name)?b[C.name].push(x):b[C.name]=[x])}function E(x,b){var C=x.value;p.assert(C),Wl.call(b,C.name)?b[C.name].push(x):b[C.name]=[x]}return d.lookup=function(x){for(var b=this;b&&!b.declares(x);b=b.parent);return b},d.lookupType=function(x){for(var b=this;b&&!b.declaresType(x);b=b.parent);return b},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},c}function BM(t){var e=t.use(br),r=e.namedTypes,n=e.builders,i=e.builtInTypes.number,s=e.builtInTypes.array,o=t.use(OM),a=t.use(yue);let c=function y(v,D,E){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,v,D,E)};var u=c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(u,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),u.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},u.prune=function(){var y=this.parent;return this.replace(),f(y)},u._computeNode=function(){var y=this.value;if(r.Node.check(y))return y;var v=this.parentPath;return v&&v.node||null},u._computeParent=function(){var y=this.value,v=this.parentPath;if(!r.Node.check(y)){for(;v&&!r.Node.check(v.value);)v=v.parentPath;v&&(v=v.parentPath)}for(;v&&!r.Node.check(v.value);)v=v.parentPath;return v||null},u._computeScope=function(){var y=this.value,v=this.parentPath,D=v&&v.scope;return r.Node.check(y)&&a.isEstablishedBy(y)&&(D=new a(this,D)),D||null},u.getValueProperty=function(y){return e.getFieldValue(this.value,y)},u.needsParens=function(y){var v=this.parentPath;if(!v)return!1;var D=this.value;if(!r.Expression.check(D)||D.type==="Identifier")return!1;for(;!r.Node.check(v.value);)if(v=v.parentPath,!v)return!1;var E=v.value;switch(D.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return E.type==="MemberExpression"&&this.name==="object"&&E.object===D;case"BinaryExpression":case"LogicalExpression":switch(E.type){case"CallExpression":return this.name==="callee"&&E.callee===D;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&E.object===D;case"BinaryExpression":case"LogicalExpression":{let x=D,b=E.operator,C=p[b],w=x.operator,F=p[w];if(C>F)return!0;if(C===F&&this.name==="right"){if(E.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(E.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(E.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return E.type==="MemberExpression"&&i.check(D.value)&&this.name==="object"&&E.object===D;case"AssignmentExpression":case"ConditionalExpression":switch(E.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&E.callee===D;case"ConditionalExpression":return this.name==="test"&&E.test===D;case"MemberExpression":return this.name==="object"&&E.object===D;default:return!1}default:if(E.type==="NewExpression"&&this.name==="callee"&&E.callee===D)return d(D)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function l(y){return r.BinaryExpression.check(y)||r.LogicalExpression.check(y)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(y,v){y.forEach(function(D){p[D]=v})});function d(y){return r.CallExpression.check(y)?!0:s.check(y)?y.some(d):r.Node.check(y)?e.someField(y,function(v,D){return d(D)}):!1}u.canBeFirstInStatement=function(){var y=this.node;return!r.FunctionExpression.check(y)&&!r.ObjectExpression.check(y)},u.firstInStatement=function(){return m(this)};function m(y){for(var v,D;y.parent;y=y.parent){if(v=y.node,D=y.parent.node,r.BlockStatement.check(D)&&y.parent.name==="body"&&y.name===0){if(D.body[0]!==v)throw new Error("Nodes must be equal");return!0}if(r.ExpressionStatement.check(D)&&y.name==="expression"){if(D.expression!==v)throw new Error("Nodes must be equal");return!0}if(r.SequenceExpression.check(D)&&y.parent.name==="expressions"&&y.name===0){if(D.expressions[0]!==v)throw new Error("Nodes must be equal");continue}if(r.CallExpression.check(D)&&y.name==="callee"){if(D.callee!==v)throw new Error("Nodes must be equal");continue}if(r.MemberExpression.check(D)&&y.name==="object"){if(D.object!==v)throw new Error("Nodes must be equal");continue}if(r.ConditionalExpression.check(D)&&y.name==="test"){if(D.test!==v)throw new Error("Nodes must be equal");continue}if(l(D)&&y.name==="left"){if(D.left!==v)throw new Error("Nodes must be equal");continue}if(r.UnaryExpression.check(D)&&!D.prefix&&y.name==="argument"){if(D.argument!==v)throw new Error("Nodes must be equal");continue}return!1}return!0}function f(y){if(r.VariableDeclaration.check(y.node)){var v=y.get("declarations").value;if(!v||v.length===0)return y.prune()}else if(r.ExpressionStatement.check(y.node)){if(!y.get("expression").value)return y.prune()}else r.IfStatement.check(y.node)&&g(y);return y}function g(y){var v=y.get("test").value,D=y.get("alternate").value,E=y.get("consequent").value;if(!E&&!D){var x=n.expressionStatement(v);y.replace(x)}else if(!E&&D){var b=n.unaryExpression("!",v,!0);r.UnaryExpression.check(v)&&v.operator==="!"&&(b=v.argument),y.get("test").replace(b),y.get("consequent").replace(D),y.get("alternate").replace()}}return c}function vue(t){var e=t.use(br),r=t.use(BM),n=e.builtInTypes.array,i=e.builtInTypes.object,s=e.builtInTypes.function,o;let a=function f(){if(!(this instanceof f))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=c(this),this._shouldVisitComments=py.call(this._methodNameTable,"Block")||py.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function c(f){var g=Object.create(null);for(var y in f)/^visit[A-Z]/.test(y)&&(g[y.slice(5)]=!0);for(var v=e.computeSupertypeLookupTable(g),D=Object.create(null),E=Object.keys(v),x=E.length,b=0;b<x;++b){var C=E[b];y="visit"+v[C],s.check(f[y])&&(D[C]=y)}return D}a.fromMethodsObject=function(g){if(g instanceof a)return g;if(!i.check(g))return new a;let y=function D(){if(!(this instanceof D))throw new Error("Visitor constructor cannot be invoked without 'new'");a.call(this)};var v=y.prototype=Object.create(l);return v.constructor=y,u(v,g),u(y,a),s.assert(y.fromMethodsObject),s.assert(y.visit),new y};function u(f,g){for(var y in g)py.call(g,y)&&(f[y]=g[y]);return f}a.visit=function(g,y){return a.fromMethodsObject(y).visit(g)};var l=a.prototype;l.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var f=arguments.length,g=new Array(f),y=0;y<f;++y)g[y]=arguments[y];g[0]instanceof r||(g[0]=new r({root:g[0]}).get("root")),this.reset.apply(this,g);var v;try{var D=this.visitWithoutReset(g[0]);v=!0}finally{if(this._visiting=!1,!v&&this._abortRequested)return g[0].value}return D},l.AbortRequest=function(){},l.abort=function(){var f=this;f._abortRequested=!0;var g=new f.AbortRequest;throw g.cancel=function(){f._abortRequested=!1},g},l.reset=function(f){},l.visitWithoutReset=function(f){if(this instanceof this.Context)return this.visitor.visitWithoutReset(f);if(!(f instanceof r))throw new Error("");var g=f.value,y=g&&typeof g=="object"&&typeof g.type=="string"&&this._methodNameTable[g.type];if(y){var v=this.acquireContext(f);try{return v.invokeVisitorMethod(y)}finally{this.releaseContext(v)}}else return p(f,this)};function p(f,g){if(!(f instanceof r))throw new Error("");if(!(g instanceof a))throw new Error("");var y=f.value;if(n.check(y))f.each(g.visitWithoutReset,g);else if(i.check(y)){var v=e.getFieldNames(y);g._shouldVisitComments&&y.comments&&v.indexOf("comments")<0&&v.push("comments");for(var D=v.length,E=[],x=0;x<D;++x){var b=v[x];py.call(y,b)||(y[b]=e.getFieldValue(y,b)),E.push(f.get(b))}for(var x=0;x<D;++x)g.visitWithoutReset(E[x])}return f.value}l.acquireContext=function(f){return this._reusableContextStack.length===0?new this.Context(f):this._reusableContextStack.pop().reset(f)},l.releaseContext=function(f){if(!(f instanceof this.Context))throw new Error("");this._reusableContextStack.push(f),f.currentPath=null},l.reportChanged=function(){this._changeReported=!0},l.wasChangeReported=function(){return this._changeReported};function d(f){function g(v){if(!(this instanceof g))throw new Error("");if(!(this instanceof a))throw new Error("");if(!(v instanceof r))throw new Error("");Object.defineProperty(this,"visitor",{value:f,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=v,this.needToCallTraverse=!0,Object.seal(this)}if(!(f instanceof a))throw new Error("");var y=g.prototype=Object.create(f);return y.constructor=g,u(y,m),g}var m=Object.create(null);return m.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},m.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");var y=this.visitor[g].call(this,this.currentPath);if(y===!1?this.needToCallTraverse=!1:y!==o&&(this.currentPath=this.currentPath.replace(y)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var v=this.currentPath;return v&&v.value},m.traverse=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");return this.needToCallTraverse=!1,p(g,a.fromMethodsObject(y||this.visitor))},m.visit=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");return this.needToCallTraverse=!1,a.fromMethodsObject(y||this.visitor).visitWithoutReset(g)},m.reportChanged=function(){this.visitor.reportChanged()},m.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},a}function bue(t){var e=t.use(br),r=e.getFieldNames,n=e.getFieldValue,i=e.builtInTypes.array,s=e.builtInTypes.object,o=e.builtInTypes.Date,a=e.builtInTypes.RegExp,c=Object.prototype.hasOwnProperty;function u(f,g,y){return i.check(y)?y.length=0:y=null,p(f,g,y)}u.assert=function(f,g){var y=[];if(!u(f,g,y))if(y.length===0){if(f!==g)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+y.map(l).join(""))};function l(f){return/[_$a-z][_$a-z0-9]*/i.test(f)?"."+f:"["+JSON.stringify(f)+"]"}function p(f,g,y){return f===g?!0:i.check(f)?d(f,g,y):s.check(f)?m(f,g,y):o.check(f)?o.check(g)&&+f==+g:a.check(f)?a.check(g)&&f.source===g.source&&f.global===g.global&&f.multiline===g.multiline&&f.ignoreCase===g.ignoreCase:f==g}function d(f,g,y){i.assert(f);var v=f.length;if(!i.check(g)||g.length!==v)return y&&y.push("length"),!1;for(var D=0;D<v;++D){if(y&&y.push(D),D in f!=D in g||!p(f[D],g[D],y))return!1;if(y){var E=y.pop();if(E!==D)throw new Error(""+E)}}return!0}function m(f,g,y){if(s.assert(f),!s.check(g))return!1;if(f.type!==g.type)return y&&y.push("type"),!1;var v=r(f),D=v.length,E=r(g),x=E.length;if(D===x){for(var b=0;b<D;++b){var C=v[b],w=n(f,C),F=n(g,C);if(y&&y.push(C),!p(w,F,y))return!1;if(y){var P=y.pop();if(P!==C)throw new Error(""+P)}}return!0}if(!y)return!1;var A=Object.create(null);for(b=0;b<D;++b)A[v[b]]=!0;for(b=0;b<x;++b){if(C=E[b],!c.call(A,C))return y.push(C),!1;delete A[C]}for(C in A){y.push(C);break}return!1}return u}function xue(t){let e=Due(),r=e.use(br);t.forEach(e.use),r.finalize();let n=e.use(vue);return{Type:r.Type,builtInTypes:r.builtInTypes,namedTypes:r.namedTypes,builders:r.builders,defineMethod:r.defineMethod,getFieldNames:r.getFieldNames,getFieldValue:r.getFieldValue,eachField:r.eachField,someField:r.someField,getSupertypeNames:r.getSupertypeNames,getBuilderName:r.getBuilderName,astNodesAreEquivalent:e.use(bue),finalize:r.finalize,Path:e.use(OM),NodePath:e.use(BM),PathVisitor:n,use:e.use,visit:n.visit}}function Due(){let t=[],e=[];function r(i){var s=t.indexOf(i);return s===-1&&(s=t.length,t.push(i),e[s]=i(n)),e[s]}var n={use:r};return n}function MM(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}function LM(t){let e=t.use(MM);return e.BinaryOperators.indexOf("**")<0&&e.BinaryOperators.push("**"),e.AssignmentOperators.indexOf("**=")<0&&e.AssignmentOperators.push("**="),e}function $M(t){let e=t.use(LM);return e.LogicalOperators.indexOf("??")<0&&e.LogicalOperators.push("??"),e}function Eue(t){let e=t.use($M);return e.LogicalOperators.forEach(r=>{let n=r+"=";e.AssignmentOperators.indexOf(n)<0&&e.AssignmentOperators.push(n)}),e}function Cue(t){var e=t.use(br),r=e.Type,n=r.def,i=r.or,s=t.use(Di),o=s.defaults,a=s.geq;let{BinaryOperators:c,AssignmentOperators:u,LogicalOperators:l}=t.use(MM);n("Printable").field("loc",i(n("SourceLocation"),null),o.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),o.null,!0),n("SourceLocation").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),o.null),n("Position").field("line",a(1)).field("column",a(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),o.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),o.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("generator",Boolean,o.false).field("async",Boolean,o.false),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),o.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,o.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],o.emptyArray).field("finalizer",i(n("BlockStatement"),null),o.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),o.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null),o.null),n("Expression").bases("Node"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var p=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean,o.true);let d=i(...c);n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",n("Expression")).field("right",n("Expression"));let m=i(...u);n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",m).field("left",i(n("Pattern"),n("MemberExpression"))).field("right",n("Expression"));var f=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",f).field("argument",n("Expression")).field("prefix",Boolean);var g=i(...l);n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var y=this.property.type;return y==="Literal"||y==="MemberExpression"||y==="BinaryExpression"}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,o.false),n("Literal").bases("Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp,BigInt)),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}function wue(t){t.use(Cue);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("Function").field("generator",Boolean,i.false).field("expression",Boolean,i.false).field("defaults",[n(r("Expression"),null)],i.emptyArray).field("rest",n(r("Identifier"),null),i.null),r("RestElement").bases("Pattern").build("argument").field("argument",r("Pattern")).field("typeAnnotation",n(r("TypeAnnotation"),r("TSTypeAnnotation"),null),i.null),r("SpreadElementPattern").bases("Pattern").build("argument").field("argument",r("Pattern")),r("FunctionDeclaration").build("id","params","body","generator","expression").field("id",n(r("Identifier"),null)),r("FunctionExpression").build("id","params","body","generator","expression"),r("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,i.null).field("body",n(r("BlockStatement"),r("Expression"))).field("generator",!1,i.false),r("ForOfStatement").bases("Statement").build("left","right","body").field("left",n(r("VariableDeclaration"),r("Pattern"))).field("right",r("Expression")).field("body",r("Statement")),r("YieldExpression").bases("Expression").build("argument","delegate").field("argument",n(r("Expression"),null)).field("delegate",Boolean,i.false),r("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",n(r("Expression"),null)),r("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",n(r("Expression"),null)),r("ComprehensionBlock").bases("Node").build("left","right","each").field("left",r("Pattern")).field("right",r("Expression")).field("each",Boolean),r("Property").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("value",n(r("Expression"),r("Pattern"))).field("method",Boolean,i.false).field("shorthand",Boolean,i.false).field("computed",Boolean,i.false),r("ObjectProperty").field("shorthand",Boolean,i.false),r("PropertyPattern").bases("Pattern").build("key","pattern").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("pattern",r("Pattern")).field("computed",Boolean,i.false),r("ObjectPattern").bases("Pattern").build("properties").field("properties",[n(r("PropertyPattern"),r("Property"))]),r("ArrayPattern").bases("Pattern").build("elements").field("elements",[n(r("Pattern"),null)]),r("SpreadElement").bases("Node").build("argument").field("argument",r("Expression")),r("ArrayExpression").field("elements",[n(r("Expression"),r("SpreadElement"),r("RestElement"),null)]),r("NewExpression").field("arguments",[n(r("Expression"),r("SpreadElement"))]),r("CallExpression").field("arguments",[n(r("Expression"),r("SpreadElement"))]),r("AssignmentPattern").bases("Pattern").build("left","right").field("left",r("Pattern")).field("right",r("Expression")),r("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",n("constructor","method","get","set")).field("key",r("Expression")).field("value",r("Function")).field("computed",Boolean,i.false).field("static",Boolean,i.false);let s=n(r("MethodDefinition"),r("VariableDeclarator"),r("ClassPropertyDefinition"),r("ClassProperty"),r("StaticBlock"));r("ClassProperty").bases("Declaration").build("key").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("computed",Boolean,i.false),r("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",s),r("ClassBody").bases("Declaration").build("body").field("body",[s]),r("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",n(r("Identifier"),null)).field("body",r("ClassBody")).field("superClass",n(r("Expression"),null),i.null),r("ClassExpression").bases("Expression").build("id","body","superClass").field("id",n(r("Identifier"),null),i.null).field("body",r("ClassBody")).field("superClass",n(r("Expression"),null),i.null),r("Super").bases("Expression").build(),r("Specifier").bases("Node"),r("ModuleSpecifier").bases("Specifier").field("local",n(r("Identifier"),null),i.null).field("id",n(r("Identifier"),null),i.null).field("name",n(r("Identifier"),null),i.null),r("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",r("Identifier")),r("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),r("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),r("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[n(r("ImportSpecifier"),r("ImportNamespaceSpecifier"),r("ImportDefaultSpecifier"))],i.emptyArray).field("source",r("Literal")).field("importKind",n("value","type"),function(){return"value"}),r("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",n(r("Declaration"),null)).field("specifiers",[r("ExportSpecifier")],i.emptyArray).field("source",n(r("Literal"),null),i.null),r("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",r("Identifier")),r("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",n(r("Declaration"),r("Expression"))),r("ExportAllDeclaration").bases("Declaration").build("source").field("source",r("Literal")),r("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",r("Expression")).field("quasi",r("TemplateLiteral")),r("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[r("TemplateElement")]).field("expressions",[r("Expression")]),r("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),r("MetaProperty").bases("Expression").build("meta","property").field("meta",r("Identifier")).field("property",r("Identifier"))}function Sue(t){t.use(LM),t.use(wue)}function Tue(t){t.use(Sue);let r=t.use(br).Type.def,n=t.use(Di).defaults;r("Function").field("async",Boolean,n.false),r("AwaitExpression").bases("Expression").build("argument").field("argument",r("Expression"))}function Pue(t){t.use(Tue);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("ForOfStatement").field("await",Boolean,i.false),r("SpreadProperty").bases("Node").build("argument").field("argument",r("Expression")),r("ObjectExpression").field("properties",[n(r("Property"),r("SpreadProperty"),r("SpreadElement"))]),r("TemplateElement").field("value",{cooked:n(String,null),raw:String}),r("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",r("Pattern")),r("ObjectPattern").field("properties",[n(r("PropertyPattern"),r("Property"),r("RestElement"),r("SpreadPropertyPattern"))])}function Aue(t){t.use(Pue);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("CatchClause").field("param",n(r("Pattern"),null),i.null)}function _ue(t){t.use($M),t.use(Aue);let e=t.use(br),r=e.Type.def,n=e.Type.or,s=t.use(Di).defaults;r("ImportExpression").bases("Expression").build("source").field("source",r("Expression")),r("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",r("Literal")).field("exported",n(r("Identifier"),null,void 0),s.null),r("ChainElement").bases("Node").field("optional",Boolean,s.false),r("CallExpression").bases("Expression","ChainElement"),r("MemberExpression").bases("Expression","ChainElement"),r("ChainExpression").bases("Expression").build("expression").field("expression",r("ChainElement")),r("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,s.true),r("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,s.true)}function Fue(t){t.use(Eue),t.use(_ue)}function kue(t){t.use(Fue);let r=t.use(br).Type.def;r("StaticBlock").bases("Declaration").build("body").field("body",[r("Statement")])}function Uf(t){t.use(kue);let e=t.use(br),r=e.Type,n=e.Type.def,i=r.or,o=t.use(Di).defaults;n("AwaitExpression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,o.false),n("Decorator").bases("Node").build("expression").field("expression",n("Expression")),n("Property").field("decorators",i([n("Decorator")],null),o.null),n("MethodDefinition").field("decorators",i([n("Decorator")],null),o.null),n("PrivateName").bases("Expression","Pattern").build("id").field("id",n("Identifier")),n("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",n("PrivateName")).field("value",i(n("Expression"),null),o.null),n("ImportAttribute").bases("Node").build("key","value").field("key",i(n("Identifier"),n("Literal"))).field("value",n("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(a=>{n(a).field("assertions",[n("ImportAttribute")],o.emptyArray)}),n("RecordExpression").bases("Expression").build("properties").field("properties",[i(n("ObjectProperty"),n("ObjectMethod"),n("SpreadElement"))]),n("TupleExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),n("SpreadElement"),null)]),n("ModuleExpression").bases("Node").build("body").field("body",n("Program"))}function Iue(t){t.use(Uf);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("JSXAttribute").bases("Node").build("name","value").field("name",n(r("JSXIdentifier"),r("JSXNamespacedName"))).field("value",n(r("Literal"),r("JSXExpressionContainer"),r("JSXElement"),r("JSXFragment"),null),i.null),r("JSXIdentifier").bases("Identifier").build("name").field("name",String),r("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",r("JSXIdentifier")).field("name",r("JSXIdentifier")),r("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",n(r("JSXIdentifier"),r("JSXMemberExpression"))).field("property",r("JSXIdentifier")).field("computed",Boolean,i.false);let s=n(r("JSXIdentifier"),r("JSXNamespacedName"),r("JSXMemberExpression"));r("JSXSpreadAttribute").bases("Node").build("argument").field("argument",r("Expression"));let o=[n(r("JSXAttribute"),r("JSXSpreadAttribute"))];r("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n(r("Expression"),r("JSXEmptyExpression")));let a=[n(r("JSXText"),r("JSXExpressionContainer"),r("JSXSpreadChild"),r("JSXElement"),r("JSXFragment"),r("Literal"))];r("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",r("JSXOpeningElement")).field("closingElement",n(r("JSXClosingElement"),null),i.null).field("children",a,i.emptyArray).field("name",s,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),r("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",s).field("attributes",o,i.emptyArray).field("selfClosing",Boolean,i.false),r("JSXClosingElement").bases("Node").build("name").field("name",s),r("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",r("JSXOpeningFragment")).field("closingFragment",r("JSXClosingFragment")).field("children",a,i.emptyArray),r("JSXOpeningFragment").bases("Node").build(),r("JSXClosingFragment").bases("Node").build(),r("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),r("JSXEmptyExpression").bases("Node").build(),r("JSXSpreadChild").bases("Node").build("expression").field("expression",r("Expression"))}function jM(t){var e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults,s=n(r("TypeAnnotation"),r("TSTypeAnnotation"),null),o=n(r("TypeParameterDeclaration"),r("TSTypeParameterDeclaration"),null);r("Identifier").field("typeAnnotation",s,i.null),r("ObjectPattern").field("typeAnnotation",s,i.null),r("Function").field("returnType",s,i.null).field("typeParameters",o,i.null),r("ClassProperty").build("key","value","typeAnnotation","static").field("value",n(r("Expression"),null)).field("static",Boolean,i.false).field("typeAnnotation",s,i.null),["ClassDeclaration","ClassExpression"].forEach(a=>{r(a).field("typeParameters",o,i.null).field("superTypeParameters",n(r("TypeParameterInstantiation"),r("TSTypeParameterInstantiation"),null),i.null).field("implements",n([r("ClassImplements")],[r("TSExpressionWithTypeArguments")]),i.emptyArray)})}function UM(t){t.use(Uf),t.use(jM);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("Flow").bases("Node"),r("FlowType").bases("Flow"),r("AnyTypeAnnotation").bases("FlowType").build(),r("EmptyTypeAnnotation").bases("FlowType").build(),r("MixedTypeAnnotation").bases("FlowType").build(),r("VoidTypeAnnotation").bases("FlowType").build(),r("SymbolTypeAnnotation").bases("FlowType").build(),r("NumberTypeAnnotation").bases("FlowType").build(),r("BigIntTypeAnnotation").bases("FlowType").build(),r("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),r("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),r("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),r("StringTypeAnnotation").bases("FlowType").build(),r("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),r("BooleanTypeAnnotation").bases("FlowType").build(),r("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),r("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",r("FlowType")),r("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",r("FlowType")),r("NullLiteralTypeAnnotation").bases("FlowType").build(),r("NullTypeAnnotation").bases("FlowType").build(),r("ThisTypeAnnotation").bases("FlowType").build(),r("ExistsTypeAnnotation").bases("FlowType").build(),r("ExistentialTypeParam").bases("FlowType").build(),r("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[r("FunctionTypeParam")]).field("returnType",r("FlowType")).field("rest",n(r("FunctionTypeParam"),null)).field("typeParameters",n(r("TypeParameterDeclaration"),null)),r("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n(r("Identifier"),null)).field("typeAnnotation",r("FlowType")).field("optional",Boolean),r("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",r("FlowType")),r("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[n(r("ObjectTypeProperty"),r("ObjectTypeSpreadProperty"))]).field("indexers",[r("ObjectTypeIndexer")],i.emptyArray).field("callProperties",[r("ObjectTypeCallProperty")],i.emptyArray).field("inexact",n(Boolean,void 0),i.undefined).field("exact",Boolean,i.false).field("internalSlots",[r("ObjectTypeInternalSlot")],i.emptyArray),r("Variance").bases("Node").build("kind").field("kind",n("plus","minus"));let s=n(r("Variance"),"plus","minus",null);r("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",n(r("Literal"),r("Identifier"))).field("value",r("FlowType")).field("optional",Boolean).field("variance",s,i.null),r("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",r("Identifier")).field("key",r("FlowType")).field("value",r("FlowType")).field("variance",s,i.null).field("static",Boolean,i.false),r("ObjectTypeCallProperty").bases("Node").build("value").field("value",r("FunctionTypeAnnotation")).field("static",Boolean,i.false),r("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",n(r("Identifier"),r("QualifiedTypeIdentifier"))).field("id",r("Identifier")),r("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",n(r("Identifier"),r("QualifiedTypeIdentifier"))).field("typeParameters",n(r("TypeParameterInstantiation"),null)),r("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",r("Identifier")).field("property",n(r("MemberTypeAnnotation"),r("GenericTypeAnnotation"))),r("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",r("FlowType")).field("indexType",r("FlowType")),r("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",r("FlowType")).field("indexType",r("FlowType")).field("optional",Boolean),r("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",r("FlowType")),r("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",r("FlowType")),r("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",r("Identifier")).field("value",r("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),r("TypeParameterDeclaration").bases("Node").build("params").field("params",[r("TypeParameter")]),r("TypeParameterInstantiation").bases("Node").build("params").field("params",[r("FlowType")]),r("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",s,i.null).field("bound",n(r("TypeAnnotation"),null),i.null).field("default",n(r("FlowType"),null),i.null),r("ClassProperty").field("variance",s,i.null),r("ClassImplements").bases("Node").build("id").field("id",r("Identifier")).field("superClass",n(r("Expression"),null),i.null).field("typeParameters",n(r("TypeParameterInstantiation"),null),i.null),r("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",r("ObjectTypeAnnotation")).field("extends",n([r("InterfaceExtends")],null),i.null),r("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null),i.null).field("body",r("ObjectTypeAnnotation")).field("extends",[r("InterfaceExtends")]),r("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),r("InterfaceExtends").bases("Node").build("id").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterInstantiation"),null),i.null),r("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null)).field("right",r("FlowType")),r("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),r("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null)).field("impltype",r("FlowType")).field("supertype",n(r("FlowType"),null)),r("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",n(r("FlowType"),null)),r("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",r("Expression")).field("typeAnnotation",r("TypeAnnotation")),r("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("DeclareVariable").bases("Statement").build("id").field("id",r("Identifier")),r("DeclareFunction").bases("Statement").build("id").field("id",r("Identifier")).field("predicate",n(r("FlowPredicate"),null),i.null),r("DeclareClass").bases("InterfaceDeclaration").build("id"),r("DeclareModule").bases("Statement").build("id","body").field("id",n(r("Identifier"),r("Literal"))).field("body",r("BlockStatement")),r("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",r("TypeAnnotation")),r("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",n(r("DeclareVariable"),r("DeclareFunction"),r("DeclareClass"),r("FlowType"),r("TypeAlias"),r("DeclareOpaqueType"),r("InterfaceDeclaration"),null)).field("specifiers",[n(r("ExportSpecifier"),r("ExportBatchSpecifier"))],i.emptyArray).field("source",n(r("Literal"),null),i.null),r("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",n(r("Literal"),null),i.null),r("ImportDeclaration").field("importKind",n("value","type","typeof"),()=>"value"),r("FlowPredicate").bases("Flow"),r("InferredPredicate").bases("FlowPredicate").build(),r("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",r("Expression")),r("Function").field("predicate",n(r("FlowPredicate"),null),i.null),r("CallExpression").field("typeArguments",n(null,r("TypeParameterInstantiation")),i.null),r("NewExpression").field("typeArguments",n(null,r("TypeParameterInstantiation")),i.null),r("EnumDeclaration").bases("Declaration").build("id","body").field("id",r("Identifier")).field("body",n(r("EnumBooleanBody"),r("EnumNumberBody"),r("EnumStringBody"),r("EnumSymbolBody"))),r("EnumBooleanBody").build("members","explicitType").field("members",[r("EnumBooleanMember")]).field("explicitType",Boolean),r("EnumNumberBody").build("members","explicitType").field("members",[r("EnumNumberMember")]).field("explicitType",Boolean),r("EnumStringBody").build("members","explicitType").field("members",n([r("EnumStringMember")],[r("EnumDefaultedMember")])).field("explicitType",Boolean),r("EnumSymbolBody").build("members").field("members",[r("EnumDefaultedMember")]),r("EnumBooleanMember").build("id","init").field("id",r("Identifier")).field("init",n(r("Literal"),Boolean)),r("EnumNumberMember").build("id","init").field("id",r("Identifier")).field("init",r("Literal")),r("EnumStringMember").build("id","init").field("id",r("Identifier")).field("init",r("Literal")),r("EnumDefaultedMember").build("id").field("id",r("Identifier"))}function Nue(t){t.use(Uf);var e=t.use(br),r=t.use(Di).defaults,n=e.Type.def,i=e.Type.or;n("VariableDeclaration").field("declarations",[i(n("VariableDeclarator"),n("Identifier"))]),n("Property").field("value",i(n("Expression"),n("Pattern"))),n("ArrayPattern").field("elements",[i(n("Pattern"),n("SpreadElement"),null)]),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"))]),n("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),n("ExportBatchSpecifier").bases("Specifier").build(),n("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("Declaration"),n("Expression"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],r.emptyArray).field("source",i(n("Literal"),null),r.null),n("Block").bases("Comment").build("value","leading","trailing"),n("Line").bases("Comment").build("value","leading","trailing")}function qM(t){t.use(Uf);let e=t.use(br),r=t.use(Di).defaults,n=e.Type.def,i=e.Type.or,{undefined:s}=e.builtInTypes;n("Noop").bases("Statement").build(),n("DoExpression").bases("Expression").build("body").field("body",[n("Statement")]),n("BindExpression").bases("Expression").build("object","callee").field("object",i(n("Expression"),null)).field("callee",n("Expression")),n("ParenthesizedExpression").bases("Expression").build("expression").field("expression",n("Expression")),n("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("CommentBlock").bases("Comment").build("value","leading","trailing"),n("CommentLine").bases("Comment").build("value","leading","trailing"),n("Directive").bases("Node").build("value").field("value",n("DirectiveLiteral")),n("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,r["use strict"]),n("InterpreterDirective").bases("Node").build("value").field("value",String),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],r.emptyArray),n("Program").bases("Node").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],r.emptyArray).field("interpreter",i(n("InterpreterDirective"),null),r.null);function o(l=String,p){return["extra",{rawValue:l,raw:String},function(){let m=e.getFieldValue(this,"value");return{rawValue:m,raw:p?p(m):String(m)}}]}n("StringLiteral").bases("Literal").build("value").field("value",String).field(...o(String,l=>JSON.stringify(l))),n("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",i(String,null),r.null).field(...o(Number)),n("BigIntLiteral").bases("Literal").build("value").field("value",i(String,Number)).field(...o(String,l=>l+"n")),n("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,l=>l+"m")),n("NullLiteral").bases("Literal").build().field("value",null,r.null),n("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),n("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(i(RegExp,s),l=>`/${l.pattern}/${l.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var a=i(n("Property"),n("ObjectMethod"),n("ObjectProperty"),n("SpreadProperty"),n("SpreadElement"));n("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),n("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",i("method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("computed",Boolean,r.false).field("generator",Boolean,r.false).field("async",Boolean,r.false).field("accessibility",i(n("Literal"),null),r.null).field("decorators",i([n("Decorator")],null),r.null),n("ObjectProperty").bases("Node").build("key","value").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("accessibility",i(n("Literal"),null),r.null).field("computed",Boolean,r.false);var c=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("ClassAccessorProperty"),n("StaticBlock"));n("ClassBody").bases("Declaration").build("body").field("body",[c]),n("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",i(n("Literal"),n("Identifier"),n("Expression"))),n("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",n("PrivateName")),n("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",i(n("Literal"),n("Identifier"),n("PrivateName"),n("Expression"))).field("value",i(n("Expression"),null),r.null),["ClassMethod","ClassPrivateMethod"].forEach(l=>{n(l).field("kind",i("get","set","method","constructor"),()=>"method").field("body",n("BlockStatement")).field("access",i("public","private","protected",null),r.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(l=>{n(l).field("computed",Boolean,r.false).field("static",Boolean,r.false).field("abstract",Boolean,r.false).field("accessibility",i("public","private","protected",null),r.null).field("decorators",i([n("Decorator")],null),r.null).field("definite",Boolean,r.false).field("optional",Boolean,r.false).field("override",Boolean,r.false).field("readonly",Boolean,r.false)});var u=i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"),n("ObjectProperty"),n("RestProperty"),n("RestElement"));n("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",i([n("Decorator")],null),r.null),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("RestProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("Import").bases("Expression").build()}function Rue(t){let r=t.use(br).Type.def;t.use(qM),t.use(UM),r("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),r("TopicReference").bases("Expression").build()}function Oue(t){t.use(qM),t.use(jM);var e=t.use(br),r=e.namedTypes,n=e.Type.def,i=e.Type.or,s=t.use(Di).defaults,o=e.Type.from(function(l,p){return!!(r.StringLiteral&&r.StringLiteral.check(l,p)||r.Literal&&r.Literal.check(l,p)&&typeof l.value=="string")},"StringLiteral");n("TSType").bases("Node");var a=i(n("Identifier"),n("TSQualifiedName"));n("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",a),n("TSHasOptionalTypeParameterInstantiation").field("typeParameters",i(n("TSTypeParameterInstantiation"),null),s.null),n("TSHasOptionalTypeParameters").field("typeParameters",i(n("TSTypeParameterDeclaration"),null,void 0),s.null),n("TSHasOptionalTypeAnnotation").field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null),n("TSQualifiedName").bases("Node").build("left","right").field("left",a).field("right",a),n("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",n("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(l=>{n(l).bases("TSType").build()}),n("TSArrayType").bases("TSType").build("elementType").field("elementType",n("TSType")),n("TSLiteralType").bases("TSType").build("literal").field("literal",i(n("NumericLiteral"),n("StringLiteral"),n("BooleanLiteral"),n("TemplateLiteral"),n("UnaryExpression"),n("BigIntLiteral"))),n("TemplateLiteral").field("expressions",i([n("Expression")],[n("TSType")])),["TSUnionType","TSIntersectionType"].forEach(l=>{n(l).bases("TSType").build("types").field("types",[n("TSType")])}),n("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",n("TSType")).field("extendsType",n("TSType")).field("trueType",n("TSType")).field("falseType",n("TSType")),n("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",n("TSTypeParameter")),n("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType"));var c=[i(n("Identifier"),n("RestElement"),n("ArrayPattern"),n("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(l=>{n(l).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",c)}),n("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,s.false).field("async",Boolean,s.false).field("generator",Boolean,s.false).field("id",i(n("Identifier"),null),s.null).field("params",[n("Pattern")]).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,s.false).field("generator",Boolean,s.false).field("params",[n("Pattern")]).field("abstract",Boolean,s.false).field("accessibility",i("public","private","protected",void 0),s.undefined).field("static",Boolean,s.false).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("key",i(n("Identifier"),n("StringLiteral"),n("NumericLiteral"),n("Expression"))).field("kind",i("get","set","method","constructor"),function(){return"method"}).field("access",i("public","private","protected",void 0),s.undefined).field("decorators",i([n("Decorator")],null),s.null).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",i(Boolean,"+","-"),s.false).field("typeParameter",n("TSTypeParameter")).field("optional",i(Boolean,"+","-"),s.false).field("typeAnnotation",i(n("TSType"),null),s.null),n("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[i(n("TSType"),n("TSNamedTupleMember"))]),n("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",n("Identifier")).field("optional",Boolean,s.false).field("elementType",n("TSType")),n("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",n("TSType")).field("indexType",n("TSType")),n("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",n("TSType")),n("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",i(n("TSType"),n("TSTypeAnnotation"))),n("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[n("Identifier")]).field("readonly",Boolean,s.false),n("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",n("Expression")).field("computed",Boolean,s.false).field("readonly",Boolean,s.false).field("optional",Boolean,s.false).field("initializer",i(n("Expression"),null),s.null),n("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",n("Expression")).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("parameters",c),n("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",i(n("Identifier"),n("TSThisType"))).field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null).field("asserts",Boolean,s.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(l=>{n(l).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",c)}),n("TSEnumMember").bases("Node").build("id","initializer").field("id",i(n("Identifier"),o)).field("initializer",i(n("Expression"),null),s.null),n("TSTypeQuery").bases("TSType").build("exprName").field("exprName",i(a,n("TSImportType")));var u=i(n("TSCallSignatureDeclaration"),n("TSConstructSignatureDeclaration"),n("TSIndexSignature"),n("TSMethodSignature"),n("TSPropertySignature"));n("TSTypeLiteral").bases("TSType").build("members").field("members",[u]),n("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",i(n("Identifier"),String)).field("constraint",i(n("TSType"),void 0),s.undefined).field("default",i(n("TSType"),void 0),s.undefined),n("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",n("TSType")).field("expression",n("Expression")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[n("TSTypeParameter")]),n("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",n("Expression")),n("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[n("TSType")]),n("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",n("Identifier")).field("const",Boolean,s.false).field("declare",Boolean,s.false).field("members",[n("TSEnumMember")]).field("initializer",i(n("Expression"),null),s.null),n("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",n("Identifier")).field("declare",Boolean,s.false).field("typeAnnotation",n("TSType")),n("TSModuleBlock").bases("Node").build("body").field("body",[n("Statement")]),n("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",i(o,a)).field("declare",Boolean,s.false).field("global",Boolean,s.false).field("body",i(n("TSModuleBlock"),n("TSModuleDeclaration"),null),s.null),n("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",o).field("qualifier",i(a,void 0),s.undefined),n("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",n("Identifier")).field("isExport",Boolean,s.false).field("moduleReference",i(a,n("TSExternalModuleReference"))),n("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",o),n("TSExportAssignment").bases("Statement").build("expression").field("expression",n("Expression")),n("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",n("Identifier")),n("TSInterfaceBody").bases("Node").build("body").field("body",[u]),n("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",a),n("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",a).field("declare",Boolean,s.false).field("extends",i([n("TSExpressionWithTypeArguments")],null),s.null).field("body",n("TSInterfaceBody")),n("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",i("public","private","protected",void 0),s.undefined).field("readonly",Boolean,s.false).field("parameter",i(n("Identifier"),n("AssignmentPattern"))),n("ClassProperty").field("access",i("public","private","protected",void 0),s.undefined),n("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),n("ClassBody").field("body",[i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassAccessorProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("StaticBlock"),n("TSDeclareMethod"),u)])}function Uue(){return`
|
|
1116
|
+
`),cooked:s===null?null:s.slice(1,u)},a.tail=c,this.next();let p=this.finishNode(a,"TemplateElement");return this.resetEndLocation(p,Rn(this.state.lastTokEndLoc,u)),p}parseTemplate(e){let r=this.startNode(),n=this.parseTemplateElement(e),i=[n],s=[];for(;!n.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(n=this.parseTemplateElement(e));return r.expressions=s,r.quasis=i,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,r,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=Object.create(null),a=!0,c=this.startNode();for(c.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(c);break}let l;r?l=this.parseBindingProperty():(l=this.parsePropertyDefinition(i),this.checkProto(l,n,o,i)),n&&!this.isObjectProperty(l)&&l.type!=="SpreadElement"&&this.raise(B.InvalidRecordProperty,l),l.shorthand&&this.addExtra(l,"shorthand",!0),c.properties.push(l)}this.next(),this.state.inFSharpPipelineDirectBody=s;let u="ObjectExpression";return r?u="ObjectPattern":n&&(u="RecordExpression"),this.finishNode(c,u)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(B.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());let n=this.startNode(),i=!1,s=!1,o;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(n.decorators=r,r=[]),n.method=!1,e&&(o=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let c=this.state.containsEsc;if(this.parsePropertyName(n,e),!a&&!c&&this.maybeAsyncOrAccessorProp(n)){let{key:u}=n,l=u.name;l==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),(l==="get"||l==="set")&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=l,this.match(55)&&(a=!0,this.raise(B.AccessorIsGenerator,this.state.curPosition(),{kind:l}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,o,a,i,!1,s,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var r;let n=this.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e);i.length!==n&&this.raise(e.kind==="get"?B.BadGetterArity:B.BadSetterArity,e),e.kind==="set"&&((r=i[i.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(B.BadSetterRestParameter,e)}parseObjectMethod(e,r,n,i,s){if(s){let o=this.parseMethod(e,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(o),o}if(n||r||this.match(10))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,r,n,!1,!1,"ObjectMethod")}parseObjectProperty(e,r,n,i){if(e.shorthand=!1,this.eat(14))return e.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(e,"ObjectProperty");if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),n)e.value=this.parseMaybeDefault(r,Ho(e.key));else if(this.match(29)){let s=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=s):this.raise(B.InvalidCoverInitializedName,s),e.value=this.parseMaybeDefault(r,Ho(e.key))}else e.value=Ho(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,r,n,i,s,o,a){let c=this.parseObjectMethod(e,n,i,s,o)||this.parseObjectProperty(e,r,s,a);return c||this.unexpected(),c}parsePropertyName(e,r){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:i}=this.state,s;if(Cs(n))s=this.parseIdentifier(!0);else switch(n){case 134:s=this.parseNumericLiteral(i);break;case 133:s=this.parseStringLiteral(i);break;case 135:s=this.parseBigIntLiteral(i);break;case 136:s=this.parseDecimalLiteral(i);break;case 138:{let o=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=o):this.raise(B.UnexpectedPrivateField,o),s=this.parsePrivateName();break}default:this.unexpected()}e.key=s,n!==138&&(e.computed=!1)}}initFunction(e,r){e.id=null,e.generator=!1,e.async=r}parseMethod(e,r,n,i,s,o,a=!1){this.initFunction(e,n),e.generator=r,this.scope.enter(18|(a?64:0)|(s?32:0)),this.prodParam.enter(sy(n,e.generator)),this.parseFunctionParams(e,i);let c=this.parseFunctionBodyAndFinish(e,o,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(e,r,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(e,!n,i,o),this.state.inFSharpPipelineDirectBody=s,this.finishNode(o,n?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,r,n,i){this.scope.enter(6);let s=sy(n,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(e,n);let o=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,r,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=o,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,r,n){this.toAssignableList(r,n,!1),e.params=r}parseFunctionBodyAndFinish(e,r,n=!1){return this.parseFunctionBody(e,!1,n),this.finishNode(e,r)}parseFunctionBody(e,r,n=!1){let i=r&&!this.match(5);if(this.expressionScope.enter(fM()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,r,!1);else{let s=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,a=>{let c=!this.isSimpleParamList(e.params);a&&c&&this.raise(B.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);let u=!s&&this.state.strict;this.checkParams(e,!this.state.strict&&!r&&!n&&!c,r,u),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,u)}),this.prodParam.exit(),this.state.labels=o}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let r=0,n=e.length;r<n;r++)if(!this.isSimpleParameter(e[r]))return!1;return!0}checkParams(e,r,n,i=!0){let s=!r&&new Set,o={type:"FormalParameters"};for(let a of e.params)this.checkLVal(a,o,5,s,i)}parseExprList(e,r,n,i){let s=[],o=!0;for(;!this.eat(e);){if(o)o=!1;else if(this.expect(12),this.match(e)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}s.push(this.parseExprListItem(r,n))}return s}parseExprListItem(e,r,n){let i;if(this.match(12))e||this.raise(B.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(r),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(B.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(r,this.parseParenItem);return i}parseIdentifier(e){let r=this.startNode(),n=this.parseIdentifierName(e);return this.createIdentifier(r,n)}createIdentifier(e,r){return e.name=r,e.loc.identifierName=r,this.finishNode(e,"Identifier")}parseIdentifierName(e){let r,{startLoc:n,type:i}=this.state;Cs(i)?r=this.state.value:this.unexpected();let s=cce(i);return e?s&&this.replaceToken(132):this.checkReservedWord(r,n,s,!1),this.next(),r}checkReservedWord(e,r,n,i){if(e.length>10||!Pce(e))return;if(n&&wce(e)){this.raise(B.UnexpectedKeyword,r,{keyword:e});return}if((this.state.strict?i?uM:aM:oM)(e,this.inModule)){this.raise(B.UnexpectedReservedWord,r,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(B.YieldBindingIdentifier,r);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(B.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(B.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(B.ArgumentsInClass,r);return}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let r=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(B.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(B.ObsoleteAwaitStar,r),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||ay(e)||e===102&&!this.state.containsEsc||e===137||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(){let e=this.startNode();this.expressionScope.recordParameterInitializerError(B.YieldInParameter,e),this.next();let r=!1,n=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:n=this.parseMaybeAssign()}return e.delegate=r,e.argument=n,this.finishNode(e,"YieldExpression")}parseImportCall(e){return this.next(),e.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(e.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(e.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise(B.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(e,r){if(this.isSimpleReference(e)){let n=this.startNodeAt(r);return n.callee=e,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),n.expression=e,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(B.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(B.PipelineTopicUnused,e)}withTopicBindingContext(e){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}else return e()}withSoloAwaitPermittingContext(e){let r=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=r}}allowInAnd(e){let r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,e);return this.state.inFSharpPipelineDirectBody=n,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let r=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(r,8,"module")}finally{n()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}},kE={kind:1},oue={kind:2},aue=/[\uD800-\uDFFF]/u,IE=/in(?:stanceof)?/y;function cue(t,e){for(let r=0;r<t.length;r++){let n=t[r],{type:i}=n;if(typeof i=="number"){{if(i===138){let{loc:s,start:o,value:a,end:c}=n,u=o+1,l=Rn(s.start,1);t.splice(r,1,new to({type:qo(27),value:"#",start:o,end:u,startLoc:s.start,endLoc:l}),new to({type:qo(132),value:a,start:u,end:c,startLoc:l,endLoc:s.end})),r++;continue}if(ay(i)){let{loc:s,start:o,value:a,end:c}=n,u=o+1,l=Rn(s.start,1),p;e.charCodeAt(o)===96?p=new to({type:qo(22),value:"`",start:o,end:u,startLoc:s.start,endLoc:l}):p=new to({type:qo(8),value:"}",start:o,end:u,startLoc:s.start,endLoc:l});let d,m,f,g;i===24?(m=c-1,f=Rn(s.end,-1),d=a===null?null:a.slice(1,-1),g=new to({type:qo(22),value:"`",start:m,end:c,startLoc:f,endLoc:s.end})):(m=c-2,f=Rn(s.end,-2),d=a===null?null:a.slice(1,-2),g=new to({type:qo(23),value:"${",start:m,end:c,startLoc:f,endLoc:s.end})),t.splice(r,1,p,new to({type:qo(20),value:d,start:u,end:m,startLoc:l,endLoc:f}),g),r+=2;continue}}n.type=qo(i)}}return t}var QE=class extends XE{parseTopLevel(e,r){return e.program=this.parseProgram(r),e.comments=this.comments,this.options.tokens&&(e.tokens=cue(this.tokens,this.input)),this.finishNode(e,"File")}parseProgram(e,r=139,n=this.options.sourceType){if(e.sourceType=n,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,r),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[s,o]of Array.from(this.scope.undefinedExports))this.raise(B.ModuleExportUndefined,o,{localName:s});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return r===139?i=this.finishNode(e,"Program"):i=this.finishNodeAt(e,"Program",Rn(this.state.startLoc,-1)),i}stmtToDirective(e){let r=e;r.type="Directive",r.value=r.expression,delete r.expression;let n=r.value,i=n.value,s=this.input.slice(n.start,n.end),o=n.value=s.slice(1,-1);return this.addExtra(n,"raw",s),this.addExtra(n,"rawValue",o),this.addExtra(n,"expressionValue",i),n.type="DirectiveLiteral",r}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(e,r){if(Go(e)){if(IE.lastIndex=r,IE.test(this.input)){let n=this.codePointAtPos(IE.lastIndex);if(!ql(n)&&n!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),r=this.codePointAtPos(e);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);return r===123||this.chStartsBindingIdentifier(r,e)}startsUsingForOf(){let{type:e,containsEsc:r}=this.lookahead();if(e===102&&!r)return!1;if(Ct(e)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let r=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(r,e))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,e&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(e,r)}parseStatementContent(e,r){let n=this.state.type,i=this.startNode(),s=!!(e&2),o=!!(e&4),a=e&1;switch(n){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return o||this.raise(this.state.strict?B.StrictFunction:this.options.annexB?B.SloppyFunctionAnnexB:B.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!s&&o);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?s||this.raise(B.UnexpectedLexicalDeclaration,i):this.raise(B.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(B.UnexpectedUsingDeclaration,this.state.startLoc):s||this.raise(B.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let l=this.nextTokenStart(),p=this.codePointAtPos(l);if(p!==91&&(!s&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,l)&&p!==123))break}case 75:s||this.raise(B.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let l=this.state.value;return this.parseVarStatement(i,l)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let l=this.lookaheadCharCode();if(l===40||l===46)break}case 82:{!this.options.allowImportExportEverywhere&&!a&&this.raise(B.UnexpectedImportExport,this.state.startLoc),this.next();let l;return n===83?(l=this.parseImport(i),l.type==="ImportDeclaration"&&(!l.importKind||l.importKind==="value")&&(this.sawUnambiguousESM=!0)):(l=this.parseExport(i,r),(l.type==="ExportNamedDeclaration"&&(!l.exportKind||l.exportKind==="value")||l.type==="ExportAllDeclaration"&&(!l.exportKind||l.exportKind==="value")||l.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(l),l}default:if(this.isAsyncFunction())return s||this.raise(B.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!s&&o)}let c=this.state.value,u=this.parseExpression();return Ct(n)&&u.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,c,u,e):this.parseExpressionStatement(i,u,r)}assertModuleNodeAllowed(e){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(B.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,r,n){return e&&(r.decorators&&r.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(B.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...e)):r.decorators=e,this.resetStartLocationFromNode(r,e[0]),n&&this.resetStartLocationFromNode(n,r)),r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(B.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(B.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let r=this.state.startLoc,n;if(this.match(10)){let i=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(i,n);let s=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(n),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==n&&this.raise(B.DecoratorArgumentsOutsideParentheses,s)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(r);i.object=n,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,n=this.finishNode(i,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(n)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(10)){let r=this.startNodeAtNode(e);return r.callee=e,r.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return e}parseBreakContinueStatement(e,r){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,r),this.finishNode(e,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,r){let n;for(n=0;n<this.state.labels.length;++n){let i=this.state.labels[n];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind===1)||e.label&&r))break}if(n===this.state.labels.length){let i=r?"BreakStatement":"ContinueStatement";this.raise(B.IllegalBreakContinue,e,{type:i})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(kE),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(kE);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(e,null);let n=this.isContextual(100);{let c=this.isContextual(96)&&this.startsAwaitUsing(),u=c||this.isContextual(107)&&this.startsUsingForOf(),l=n&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||l){let p=this.startNode(),d;c?(d="await using",this.recordAwaitIfAllowed()||this.raise(B.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(p,!0,d);let m=this.finishNode(p,"VariableDeclaration"),f=this.match(58);return f&&u&&this.raise(B.ForInUsing,m),(f||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(e,m,r):(r!==null&&this.unexpected(r),this.parseFor(e,m))}}let i=this.isContextual(95),s=new Gl,o=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(n&&this.raise(B.ForOfLet,o),r===null&&i&&o.type==="Identifier"&&this.raise(B.ForOfAsync,o)),a||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(o,!0);let c=a?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{type:c}),this.parseForIn(e,o,r)}else this.checkExpressionErrors(s,!0);return r!==null&&this.unexpected(r),this.parseFor(e,o)}parseFunctionStatement(e,r,n){return this.next(),this.parseFunction(e,1|(n?2:0)|(r?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(B.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let r=e.cases=[];this.expect(5),this.state.labels.push(oue),this.scope.enter(0);let n;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let s=this.match(61);n&&this.finishNode(n,"SwitchCase"),r.push(n=this.startNode()),n.consequent=[],this.next(),s?n.test=this.parseExpression():(i&&this.raise(B.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(B.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(B.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,r,n=!1){return this.next(),this.parseVar(e,!1,r,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(kE),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(B.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,r,n,i){for(let o of this.state.labels)o.name===r&&this.raise(B.LabelRedeclaration,n,{labelName:r});let s=pce(this.state.type)?1:this.match(71)?2:null;for(let o=this.state.labels.length-1;o>=0;o--){let a=this.state.labels[o];if(a.statementStart===e.start)a.statementStart=this.state.start,a.kind=s;else break}return this.state.labels.push({name:r,kind:s,statementStart:this.state.start}),e.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,r,n){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,r=!0,n){let i=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(i,e,!1,8,n),r&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,r,n,i,s){let o=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(o,r?a:void 0,n,i,s)}parseBlockOrModuleBlockBody(e,r,n,i,s){let o=this.state.strict,a=!1,c=!1;for(;!this.match(i);){let u=n?this.parseModuleItem():this.parseStatementListItem();if(r&&!c){if(this.isValidDirective(u)){let l=this.stmtToDirective(u);r.push(l),!a&&l.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}e.push(u)}s?.call(this,a),o||this.setStrict(!1),this.next()}parseFor(e,r){return e.init=r,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,r,n){let i=this.match(58);return this.next(),i?n!==null&&this.unexpected(n):e.await=n!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(B.ForInOfLoopInitializer,r,{type:i?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(B.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),e.left=r,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}parseVar(e,r,n,i=!1){let s=e.declarations=[];for(e.kind=n;;){let o=this.startNode();if(this.parseVarId(o,n),o.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,o.init===null&&!i&&(o.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(B.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(B.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),s.push(this.finishNode(o,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,r){let n=this.parseBindingAtom();(r==="using"||r==="await using")&&(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise(B.UsingDeclarationHasBindingPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},r==="var"?5:8201),e.id=n}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,r=0){let n=r&2,i=!!(r&1),s=i&&!(r&4),o=!!(r&8);this.initFunction(e,o),this.match(55)&&(n&&this.raise(B.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(s));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(sy(o,e.generator)),i||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!n&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||Ct(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,r){this.expect(10),this.expressionScope.enter(Oce()),e.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,r,n){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(e,r,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,i),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,r){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:e},i=[],s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(B.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let o=this.startNode();i.length&&(o.decorators=i,this.resetStartLocationFromNode(o,i[0]),i=[]),this.parseClassMember(s,o,n),o.kind==="constructor"&&o.decorators&&o.decorators.length>0&&this.raise(B.DecoratorConstructor,o)}}),this.state.strict=r,this.next(),i.length)throw this.raise(B.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(e,r){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let i=r;return i.kind="method",i.computed=!1,i.key=n,i.static=!1,this.pushClassMethod(e,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=r;return i.computed=!1,i.key=n,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(e,r,n){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(e,r))return;if(this.eat(5)){this.parseClassStaticBlock(e,r);return}}this.parseClassMemberWithIsStatic(e,r,n,i)}parseClassMemberWithIsStatic(e,r,n,i){let s=r,o=r,a=r,c=r,u=r,l=s,p=s;if(r.static=i,this.parsePropertyNamePrefixOperator(r),this.eat(55)){l.kind="method";let v=this.match(138);if(this.parseClassElementName(l),v){this.pushClassPrivateMethod(e,o,!0,!1);return}this.isNonstaticConstructor(s)&&this.raise(B.ConstructorIsGenerator,s.key),this.pushClassMethod(e,s,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&Ct(this.state.type),m=this.parseClassElementName(r),f=d?m.name:null,g=this.isPrivateName(m),y=this.state.startLoc;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(l.kind="method",g){this.pushClassPrivateMethod(e,o,!1,!1);return}let v=this.isNonstaticConstructor(s),D=!1;v&&(s.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(B.DuplicateConstructor,m),v&&this.hasPlugin("typescript")&&r.override&&this.raise(B.OverrideOnConstructor,m),n.hadConstructor=!0,D=n.hadSuperClass),this.pushClassMethod(e,s,!1,!1,v,D)}else if(this.isClassProperty())g?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,a);else if(f==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);let v=this.eat(55);p.optional&&this.unexpected(y),l.kind="method";let D=this.match(138);this.parseClassElementName(l),this.parsePostMemberNameModifiers(p),D?this.pushClassPrivateMethod(e,o,v,!0):(this.isNonstaticConstructor(s)&&this.raise(B.ConstructorIsAsync,s.key),this.pushClassMethod(e,s,v,!0,!1,!1))}else if((f==="get"||f==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),l.kind=f;let v=this.match(138);this.parseClassElementName(s),v?this.pushClassPrivateMethod(e,o,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(B.ConstructorIsAccessor,s.key),this.pushClassMethod(e,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else if(f==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);let v=this.match(138);this.parseClassElementName(a),this.pushClassAccessorProperty(e,u,v)}else this.isLineTerminator()?g?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,a):this.unexpected()}parseClassElementName(e){let{type:r,value:n}=this.state;if((r===132||r===133)&&e.static&&n==="prototype"&&this.raise(B.StaticPrototype,this.state.startLoc),r===138){n==="constructor"&&this.raise(B.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return e.key=i,i}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,r){var n;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let s=r.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,e.body.push(this.finishNode(r,"StaticBlock")),(n=r.decorators)!=null&&n.length&&this.raise(B.DecoratorStaticBlock,r)}pushClassProperty(e,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(B.ConstructorClassField,r.key),e.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(e,r){let n=this.parseClassPrivateProperty(r);e.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(e,r,n){!n&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(B.ConstructorClassField,r.key);let i=this.parseClassAccessorProperty(r);e.body.push(i),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(e,r,n,i,s,o){e.body.push(this.parseMethod(r,n,i,s,o,"ClassMethod",!0))}pushClassPrivateMethod(e,r,n,i){let s=this.parseMethod(r,n,i,!1,!1,"ClassPrivateMethod",!0);e.body.push(s);let o=s.kind==="get"?s.static?6:2:s.kind==="set"?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,o)}declareClassPrivateMethodInScope(e,r){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),r,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(fM()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,r,n,i=8331){if(Ct(this.state.type))e.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(e.id,i);else if(n||!r)e.id=null;else throw this.raise(B.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,r){let n=this.parseMaybeImportPhase(e,!0),i=this.maybeParseExportDefaultSpecifier(e,n),s=!i||this.eat(12),o=s&&this.eatExportStar(e),a=o&&this.maybeParseExportNamespaceSpecifier(e),c=s&&(!a||this.eat(12)),u=i||o;if(o&&!a){if(i&&this.unexpected(),r)throw this.raise(B.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}let l=this.maybeParseExportNamedSpecifiers(e);i&&s&&!o&&!l&&this.unexpected(null,5),a&&c&&this.unexpected(null,98);let p;if(u||l){if(p=!1,r)throw this.raise(B.UnsupportedDecoratorExport,e);this.parseExportFrom(e,u)}else p=this.maybeParseExportDeclaration(e);if(u||l||p){var d;let m=e;if(this.checkExport(m,!0,!1,!!m.source),((d=m.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(r,m.declaration,m);else if(r)throw this.raise(B.UnsupportedDecoratorExport,e);return this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=e,f=this.parseExportDefaultExpression();if(m.declaration=f,f.type==="ClassDeclaration")this.maybeTakeDecorators(r,f,m);else if(r)throw this.raise(B.UnsupportedDecoratorExport,e);return this.checkExport(m,!0,!0),this.finishNode(m,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r?.loc.start);let n=r||this.parseIdentifier(!0),i=this.startNodeAtNode(n);return i.exported=n,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var r,n;(n=(r=e).specifiers)!=null||(r.specifiers=[]);let i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let r=e;r.specifiers||(r.specifiers=[]);let n=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(n)),r.source=null,r.declaration=null,this.hasPlugin("importAssertions")&&(r.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(B.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(B.UnsupportedDefaultExport,this.state.startLoc);let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(Ct(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(Ct(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let r=this.nextTokenStart(),n=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||Ct(this.state.type)&&n)return!0;if(this.match(65)&&n){let i=this.input.charCodeAt(this.nextTokenStartSince(r+4));return i===34||i===39}return!1}parseExportFrom(e,r){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(B.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(B.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(B.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,r,n,i){if(r){var s;if(n){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var o;let a=e.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((o=a.extra)!=null&&o.parenthesized)&&this.raise(B.ExportDefaultFromAsIdentifier,a)}}else if((s=e.specifiers)!=null&&s.length)for(let a of e.specifiers){let{exported:c}=a,u=c.type==="Identifier"?c.name:c.value;if(this.checkDuplicateExports(a,u),!i&&a.local){let{local:l}=a;l.type!=="Identifier"?this.raise(B.ExportBindingIsString,a,{localName:l.value,exportName:u}):(this.checkReservedWord(l.name,l.loc.start,!0,!1),this.scope.checkLocalExport(l))}}else if(e.declaration){let a=e.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:c}=a;if(!c)throw new Error("Assertion failure");this.checkDuplicateExports(e,c.name)}else if(a.type==="VariableDeclaration")for(let c of a.declarations)this.checkDeclaration(c.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let r of e.properties)this.checkDeclaration(r);else if(e.type==="ArrayPattern")for(let r of e.elements)r&&this.checkDeclaration(r);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(B.DuplicateDefaultExport,e):this.raise(B.DuplicateExport,e,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(e){let r=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),s=this.match(133),o=this.startNode();o.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(o,s,e,i))}return r}parseExportSpecifier(e,r,n,i){return this.eatContextual(93)?e.exported=this.parseModuleExportName():r?e.exported=$ce(e.local):e.exported||(e.exported=Ho(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let e=this.parseStringLiteral(this.state.value),r=aue.exec(e.value);return r&&this.raise(B.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:r[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:r,value:n})=>n.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(e){let{specifiers:r}=e,n=r.length===1?r[0].type:null;if(e.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise(B.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(e.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(B.DeferImportRequiresNamespace,r[0].loc.start);else if(e.module){var i;n!=="ImportDefaultSpecifier"&&this.raise(B.ImportReflectionNotBinding,r[0].loc.start),((i=e.assertions)==null?void 0:i.length)>0&&this.raise(B.ImportReflectionHasAssertion,r[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){let{specifiers:r}=e;if(r!=null){let n=r.find(i=>{let s;if(i.type==="ExportSpecifier"?s=i.local:i.type==="ImportSpecifier"&&(s=i.imported),s!==void 0)return s.type==="Identifier"?s.name!=="default":s.value!=="default"});n!==void 0&&this.raise(B.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,r,n,i){r||(n==="module"?(this.expectPlugin("importReflection",i),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",i),e.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",i),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(e,r,null),null;let n=this.parseIdentifier(!0),{type:i}=this.state;return(Cs(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(n),this.applyImportPhase(e,r,n.name,n.loc.start),null):(this.applyImportPhase(e,r,null),n)}isPrecedingIdImportPhase(e){let{type:r}=this.state;return Ct(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(e){return this.match(133)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,r){e.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(e,r)||this.eat(12),s=i&&this.maybeParseStarImportSpecifier(e);return i&&!s&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){var r;return(r=e.specifiers)!=null||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,r,n){r.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(r,n))}finishImportSpecifier(e,r,n=8201){return this.checkLVal(e.local,{type:r},n),this.finishNode(e,r)}parseImportAttributes(){this.expect(5);let e=[],r=new Set;do{if(this.match(8))break;let n=this.startNode(),i=this.state.value;if(r.has(i)&&this.raise(B.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),r.add(i),this.match(133)?n.key=this.parseStringLiteral(i):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(B.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],r=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise(B.ModuleAttributeDifferentFromType,n.key),r.has(n.key.name)&&this.raise(B.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),r.add(n.key.name),this.expect(14),!this.match(133))throw this.raise(B.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let r,n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?r=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),r=this.parseImportAttributes()),n=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(B.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(e,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),r=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))r=[];else if(this.hasPlugin("moduleAttributes"))r=[];else return;!n&&this.hasPlugin("importAssertions")?e.assertions=r:e.attributes=r}maybeParseDefaultImportSpecifier(e,r){if(r){let n=this.startNodeAtNode(r);return n.local=r,e.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(Cs(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(B.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),i=this.match(133),s=this.isContextual(130);n.imported=this.parseModuleExportName();let o=this.parseImportSpecifier(n,i,e.importKind==="type"||e.importKind==="typeof",s,void 0);e.specifiers.push(o)}}parseImportSpecifier(e,r,n,i,s){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:o}=e;if(r)throw this.raise(B.ImportBindingIsString,e,{importName:o.value});this.checkReservedWord(o.name,e.loc.start,!0,!0),e.local||(e.local=Ho(o))}return this.finishImportSpecifier(e,"ImportSpecifier",s)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},uy=class extends QE{constructor(e,r,n){e=sue(e),super(e,r),this.options=e,this.initializeScopes(),this.plugins=n,this.filename=e.sourceFilename}getScopeHandler(){return Tf}parse(){this.enterInitialScopes();let e=this.startNode(),r=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,r),e.errors=this.state.errors,e.comments.length=this.state.commentsLen,e}};function uue(t,e){var r;if(((r=e)==null?void 0:r.sourceType)==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let n=Cf(e,t),i=n.parse();if(n.sawUnambiguousESM)return i;if(n.ambiguousScriptDifferentAst)try{return e.sourceType="script",Cf(e,t).parse()}catch{}else i.program.sourceType="script";return i}catch(n){try{return e.sourceType="script",Cf(e,t).parse()}catch{}throw n}}else return Cf(e,t).parse()}function lue(t,e){let r=Cf(e,t);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function pue(t){let e={};for(let r of Object.keys(t))e[r]=qo(t[r]);return e}var due=pue(ace);function Cf(t,e){let r=uy,n=new Map;if(t!=null&&t.plugins){for(let i of t.plugins){let s,o;typeof i=="string"?s=i:[s,o]=i,n.has(s)||n.set(s,o||{})}nue(n),r=fue(n)}return new r(t,e,n)}var rM=new Map;function fue(t){let e=[];for(let i of iue)t.has(i)&&e.push(i);let r=e.join("|"),n=rM.get(r);if(!n){n=uy;for(let i of e)n=yM[i](n);rM.set(r,n)}return n}Af.parse=uue;Af.parseExpression=lue;Af.tokTypes=due});var PC={};Yh(PC,{MagicastError:()=>gn,builders:()=>zle,detectCodeFormat:()=>f8,generateCode:()=>TC,loadFile:()=>Ule,parseExpression:()=>h8,parseModule:()=>m8,writeFile:()=>qle});function Di(t){var e=t.use(br),r=e.Type,n=e.builtInTypes,i=n.number;function s(u){return r.from(l=>i.check(l)&&l>=u,i+" >= "+u)}let o={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){},"use strict":function(){return"use strict"}};var a=r.or(n.string,n.number,n.boolean,n.null,n.undefined);let c=r.from(u=>{if(u===null)return!0;var l=typeof u;return!(l==="object"||l==="function")},a.toString());return{geq:s,defaults:o,isPrimitive:c}}function Ut(t){try{var e=t(),r=e.exports,n=r.default}catch{return}n&&n!==r&&typeof r=="object"&&(Object.assign(n,r,{default:n}),r.__esModule&&Object.defineProperty(n,"__esModule",{value:!0}),e.exports=n)}function DC(t){return Array.isArray(t)?"["+t.map(DC).join(", ")+"]":t&&typeof t=="object"?"{ "+Object.keys(t).map(function(e){return e+": "+t[e]}).join(", ")+" }":JSON.stringify(t)}function br(t){let e={or(...$){return new Cy($.map(H=>e.from(H)))},from($,H){if($ instanceof Mf||$ instanceof Dy||$ instanceof Ey||$ instanceof Cy||$ instanceof zc)return $;if($ instanceof Of)return $.type;if(a.check($)){if($.length!==1)throw new Error("only one element type is permitted for typed arrays");return new Mf(e.from($[0]))}if(c.check($))return new Ey(Object.keys($).map(le=>new wy(le,e.from($[le],le))));if(typeof $=="function"){var Z=r.indexOf($);if(Z>=0)return n[Z];if(typeof H!="string")throw new Error("missing name");return new zc(H,$)}return new Dy($)},def($){return Vi.call(v,$)?v[$]:v[$]=new E($)},hasDef($){return Vi.call(v,$)}};var r=[],n=[];function i($,H){let Z=xy.call(H),le=new zc($,pe=>xy.call(pe)===Z);return H&&typeof H.constructor=="function"&&(r.push(H.constructor),n.push(le)),le}let s=i("string","truthy"),o=i("function",function(){}),a=i("array",[]),c=i("object",{}),u=i("RegExp",/./),l=i("Date",new Date),p=i("number",3),d=i("boolean",!0),m=i("null",null),f=i("undefined",void 0),g=typeof BigInt=="function"?i("BigInt",BigInt(1234)):new zc("BigInt",()=>!1),y={string:s,function:o,array:a,object:c,RegExp:u,Date:l,number:p,boolean:d,null:m,undefined:f,BigInt:g};var v=Object.create(null);function D($){if($&&typeof $=="object"){var H=$.type;if(typeof H=="string"&&Vi.call(v,H)){var Z=v[H];if(Z.finalized)return Z}}return null}class E extends Of{constructor(H){super(new zc(H,(Z,le)=>this.check(Z,le)),H)}check(H,Z){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(H===null||typeof H!="object")return!1;var le=D(H);return le?Z&&le===this?this.checkAllFields(H,Z):this.isSupertypeOf(le)?Z?le.checkAllFields(H,Z)&&this.checkAllFields(H,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(H,Z):!1}build(...H){if(this.buildParams=H,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let Z=(pe,fe,oe,Ge)=>{if(!Vi.call(pe,fe)){var ct=this.allFields;if(!Vi.call(ct,fe))throw new Error(""+fe);var ue=ct[fe],Ee=ue.type,re;if(Ge)re=oe;else if(ue.defaultFn)re=ue.defaultFn.call(pe);else{var Re="no value or default function given for field "+JSON.stringify(fe)+" of "+this.typeName+"("+this.buildParams.map(function(ye){return ct[ye]}).join(", ")+")";throw new Error(Re)}if(!Ee.check(re))throw new Error(DC(re)+" does not match field "+ue+" of type "+this.typeName);pe[fe]=re}},le=(...pe)=>{var fe=pe.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var oe=Object.create(w);if(this.buildParams.forEach(function(Ge,ct){ct<fe?Z(oe,Ge,pe[ct],!0):Z(oe,Ge,null,!1)}),Object.keys(this.allFields).forEach(function(Ge){Z(oe,Ge,null,!1)}),oe.type!==this.typeName)throw new Error("");return oe};return le.from=pe=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var fe=Object.create(w);if(Object.keys(this.allFields).forEach(function(oe){Vi.call(pe,oe)?Z(fe,oe,pe[oe],!0):Z(fe,oe,null,!1)}),fe.type!==this.typeName)throw new Error("");return fe},Object.defineProperty(C,P(this.typeName),{enumerable:!0,value:le}),this}field(H,Z,le,pe){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(H)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[H]=new wy(H,e.from(Z),le,pe),this)}finalize(){if(!this.finalized){var H=this.allFields,Z=this.allSupertypes;this.baseNames.forEach(pe=>{var fe=v[pe];if(fe instanceof Of)fe.finalize(),G(H,fe.allFields),G(Z,fe.allSupertypes);else{var oe="unknown supertype name "+JSON.stringify(pe)+" for subtype "+JSON.stringify(this.typeName);throw new Error(oe)}}),G(H,this.ownFields),Z[this.typeName]=this,this.fieldNames.length=0;for(var le in H)Vi.call(H,le)&&!H[le].hidden&&this.fieldNames.push(le);Object.defineProperty(_,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,j(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&O(this.typeName)}}}function x($){if(!Vi.call(v,$))throw new Error("");var H=v[$];if(H.finalized!==!0)throw new Error("");return H.supertypeList.slice(1)}function b($){for(var H={},Z=Object.keys(v),le=Z.length,pe=0;pe<le;++pe){var fe=Z[pe],oe=v[fe];if(oe.finalized!==!0)throw new Error(""+fe);for(var Ge=0;Ge<oe.supertypeList.length;++Ge){var ct=oe.supertypeList[Ge];if(Vi.call($,ct)){H[fe]=ct;break}}}return H}var C=Object.create(null),w={};function F($,H){var Z=w[$];return f.check(H)?delete w[$]:(o.assert(H),Object.defineProperty(w,$,{enumerable:!0,configurable:!0,value:H})),Z}function P($){return $.replace(/^[A-Z]+/,function(H){var Z=H.length;switch(Z){case 0:return"";case 1:return H.toLowerCase();default:return H.slice(0,Z-1).toLowerCase()+H.charAt(Z-1)}})}function A($){return $=P($),$.replace(/(Expression)?$/,"Statement")}var _={};function z($){var H=D($);if(H)return H.fieldNames.slice(0);if("type"in $)throw new Error("did not recognize object of type "+JSON.stringify($.type));return Object.keys($)}function M($,H){var Z=D($);if(Z){var le=Z.allFields[H];if(le)return le.getValue($)}return $&&$[H]}function U($,H,Z){z($).forEach(function(le){H.call(this,le,M($,le))},Z)}function k($,H,Z){return z($).some(function(le){return H.call(this,le,M($,le))},Z)}function O($){var H=A($);if(C[H])return;var Z=C[P($)];if(!Z)return;let le=function(...pe){return C.expressionStatement(Z.apply(C,pe))};le.from=function(...pe){return C.expressionStatement(Z.from.apply(C,pe))},C[H]=le}function j($,H){H.length=0,H.push($);for(var Z=Object.create(null),le=0;le<H.length;++le){$=H[le];var pe=v[$];if(pe.finalized!==!0)throw new Error("");Vi.call(Z,$)&&delete H[Z[$]],Z[$]=le,H.push.apply(H,pe.baseNames)}for(var fe=0,oe=fe,Ge=H.length;oe<Ge;++oe)Vi.call(H,oe)&&(H[fe++]=H[oe]);H.length=fe}function G($,H){return Object.keys(H).forEach(function(Z){$[Z]=H[Z]}),$}function Q(){Object.keys(v).forEach(function($){v[$].finalize()})}return{Type:e,builtInTypes:y,getSupertypeNames:x,computeSupertypeLookupTable:b,builders:C,defineMethod:F,getBuilderName:P,getStatementBuilderName:A,namedTypes:_,getFieldNames:z,getFieldValue:M,eachField:U,someField:k,finalize:Q}}function OM(t){var e=t.use(br),r=e.builtInTypes.array,n=e.builtInTypes.number;let i=function p(d,m,f){if(!(this instanceof p))throw new Error("Path constructor cannot be invoked without 'new'");if(m){if(!(m instanceof p))throw new Error("")}else m=null,f=null;this.value=d,this.parentPath=m,this.name=f,this.__childCache=null};var s=i.prototype;function o(p){return p.__childCache||(p.__childCache=Object.create(null))}function a(p,d){var m=o(p),f=p.getValueProperty(d),g=m[d];return(!ly.call(m,d)||g.value!==f)&&(g=m[d]=new p.constructor(f,p,d)),g}s.getValueProperty=function(d){return this.value[d]},s.get=function(...d){for(var m=this,f=d.length,g=0;g<f;++g)m=a(m,d[g]);return m},s.each=function(d,m){for(var f=[],g=this.value.length,y=0,y=0;y<g;++y)ly.call(this.value,y)&&(f[y]=this.get(y));for(m=m||this,y=0;y<g;++y)ly.call(f,y)&&d.call(m,f[y])},s.map=function(d,m){var f=[];return this.each(function(g){f.push(d.call(this,g))},m),f},s.filter=function(d,m){var f=[];return this.each(function(g){d.call(this,g)&&f.push(g)},m),f};function c(){}function u(p,d,m,f){if(r.assert(p.value),d===0)return c;var g=p.value.length;if(g<1)return c;var y=arguments.length;y===2?(m=0,f=g):y===3?(m=Math.max(m,0),f=g):(m=Math.max(m,0),f=Math.min(f,g)),n.assert(m),n.assert(f);for(var v=Object.create(null),D=o(p),E=m;E<f;++E)if(ly.call(p.value,E)){var x=p.get(E);if(x.name!==E)throw new Error("");var b=E+d;x.name=b,v[b]=x,delete D[E]}return delete D.length,function(){for(var C in v){var w=v[C];if(w.name!==+C)throw new Error("");D[C]=w,p.value[C]=w.value}}}s.shift=function(){var d=u(this,-1),m=this.value.shift();return d(),m},s.unshift=function(...d){var m=u(this,d.length),f=this.value.unshift.apply(this.value,d);return m(),f},s.push=function(...d){return r.assert(this.value),delete o(this).length,this.value.push.apply(this.value,d)},s.pop=function(){r.assert(this.value);var d=o(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},s.insertAt=function(d){var m=arguments.length,f=u(this,m-1,d);if(f===c&&m<=1)return this;d=Math.max(d,0);for(var g=1;g<m;++g)this.value[d+g-1]=arguments[g];return f(),this},s.insertBefore=function(...d){for(var m=this.parentPath,f=d.length,g=[this.name],y=0;y<f;++y)g.push(d[y]);return m.insertAt.apply(m,g)},s.insertAfter=function(...d){for(var m=this.parentPath,f=d.length,g=[this.name+1],y=0;y<f;++y)g.push(d[y]);return m.insertAt.apply(m,g)};function l(p){if(!(p instanceof i))throw new Error("");var d=p.parentPath;if(!d)return p;var m=d.value,f=o(d);if(m[p.name]===p.value)f[p.name]=p;else if(r.check(m)){var g=m.indexOf(p.value);g>=0&&(f[p.name=g]=p)}else m[p.name]=p.value,f[p.name]=p;if(m[p.name]!==p.value)throw new Error("");if(p.parentPath.get(p.name)!==p)throw new Error("");return p}return s.replace=function(d){var m=[],f=this.parentPath.value,g=o(this.parentPath),y=arguments.length;if(l(this),r.check(f)){for(var v=f.length,D=u(this.parentPath,y-1,this.name+1),E=[this.name,1],x=0;x<y;++x)E.push(arguments[x]);var b=f.splice.apply(f,E);if(b[0]!==this.value)throw new Error("");if(f.length!==v-1+y)throw new Error("");if(D(),y===0)delete this.value,delete g[this.name],this.__childCache=null;else{if(f[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,this.__childCache=null),x=0;x<y;++x)m.push(this.parentPath.get(this.name+x));if(m[0]!==this)throw new Error("")}}else if(y===1)this.value!==d&&(this.__childCache=null),this.value=f[this.name]=d,m.push(this);else if(y===0)delete f[this.name],delete this.value,this.__childCache=null;else throw new Error("Could not replace path");return m},i}function yue(t){var e=t.use(br),r=e.Type,n=e.namedTypes,i=n.Node,s=n.Expression,o=e.builtInTypes.array,a=e.builders;let c=function x(b,C){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");l.check(b.value)||u.assert(b.value);var w;if(C){if(!(C instanceof x))throw new Error("");w=C.depth+1}else C=null,w=0;Object.defineProperties(this,{path:{value:b},node:{value:b.value},isGlobal:{value:!C,enumerable:!0},depth:{value:w},parent:{value:C},bindings:{value:{}},types:{value:{}}})};var u=r.or(n.Program,n.Function,n.CatchClause),l=r.or(n.Function,n.ClassDeclaration,n.ClassExpression,n.InterfaceDeclaration,n.TSInterfaceDeclaration,n.TypeAlias,n.TSTypeAliasDeclaration),p=r.or(n.TypeParameter,n.TSTypeParameter);c.isEstablishedBy=function(x){return u.check(x)||l.check(x)};var d=c.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Wl.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Wl.call(this.types,x)},d.declareTemporary=function(x){if(x){if(!/^[a-z$_]/i.test(x))throw new Error("")}else x="t$";x+=this.depth.toString(36)+"$",this.scan();for(var b=0;this.declares(x+b);)++b;var C=x+b;return this.bindings[C]=e.builders.identifier(C)},d.injectTemporary=function(x,b){x||(x=this.declareTemporary());var C=this.path.get("body");return n.BlockStatement.check(C.value)&&(C=C.get("body")),C.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,b||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var b in this.bindings)delete this.bindings[b];for(var b in this.types)delete this.types[b];m(this.path,this.bindings,this.types),this.didScan=!0}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types};function m(x,b,C){var w=x.value;if(l.check(w)){let F=x.get("typeParameters","params");o.check(F.value)&&F.each(P=>{E(P,C)})}u.check(w)&&(n.CatchClause.check(w)?v(x.get("param"),b):f(x,b,C))}function f(x,b,C){var w=x.value;x.parent&&n.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&v(x.parent.get("id"),b),w&&(o.check(w)?x.each(F=>{y(F,b,C)}):n.Function.check(w)?(x.get("params").each(F=>{v(F,b)}),y(x.get("body"),b,C),f(x.get("typeParameters"),b,C)):n.TypeAlias&&n.TypeAlias.check(w)||n.InterfaceDeclaration&&n.InterfaceDeclaration.check(w)||n.TSTypeAliasDeclaration&&n.TSTypeAliasDeclaration.check(w)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(w)?D(x.get("id"),C):n.VariableDeclarator.check(w)?(v(x.get("id"),b),y(x.get("init"),b,C)):w.type==="ImportSpecifier"||w.type==="ImportNamespaceSpecifier"||w.type==="ImportDefaultSpecifier"?v(x.get(w.local?"local":w.name?"name":"id"),b):i.check(w)&&!s.check(w)&&e.eachField(w,function(F,P){var A=x.get(F);if(!g(A,P))throw new Error("");y(A,b,C)}))}function g(x,b){return!!(x.value===b||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(b)&&b.length===0)}function y(x,b,C){var w=x.value;if(!(!w||s.check(w)))if(n.FunctionDeclaration.check(w)&&w.id!==null)v(x.get("id"),b);else if(n.ClassDeclaration&&n.ClassDeclaration.check(w)&&w.id!==null)v(x.get("id"),b),f(x.get("typeParameters"),b,C);else if(n.InterfaceDeclaration&&n.InterfaceDeclaration.check(w)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(w))D(x.get("id"),C);else if(u.check(w)){if(n.CatchClause.check(w)&&n.Identifier.check(w.param)){var F=w.param.name,P=Wl.call(b,F);f(x.get("body"),b,C),P||delete b[F]}}else f(x,b,C)}function v(x,b){var C=x.value;n.Pattern.assert(C),n.Identifier.check(C)?Wl.call(b,C.name)?b[C.name].push(x):b[C.name]=[x]:n.AssignmentPattern&&n.AssignmentPattern.check(C)?v(x.get("left"),b):n.ObjectPattern&&n.ObjectPattern.check(C)?x.get("properties").each(function(w){var F=w.value;n.Pattern.check(F)?v(w,b):n.Property.check(F)||n.ObjectProperty&&n.ObjectProperty.check(F)?v(w.get("value"),b):n.SpreadProperty&&n.SpreadProperty.check(F)&&v(w.get("argument"),b)}):n.ArrayPattern&&n.ArrayPattern.check(C)?x.get("elements").each(function(w){var F=w.value;n.Pattern.check(F)?v(w,b):n.SpreadElement&&n.SpreadElement.check(F)&&v(w.get("argument"),b)}):n.PropertyPattern&&n.PropertyPattern.check(C)?v(x.get("pattern"),b):(n.SpreadElementPattern&&n.SpreadElementPattern.check(C)||n.RestElement&&n.RestElement.check(C)||n.SpreadPropertyPattern&&n.SpreadPropertyPattern.check(C))&&v(x.get("argument"),b)}function D(x,b){var C=x.value;n.Pattern.assert(C),n.Identifier.check(C)&&(Wl.call(b,C.name)?b[C.name].push(x):b[C.name]=[x])}function E(x,b){var C=x.value;p.assert(C),Wl.call(b,C.name)?b[C.name].push(x):b[C.name]=[x]}return d.lookup=function(x){for(var b=this;b&&!b.declares(x);b=b.parent);return b},d.lookupType=function(x){for(var b=this;b&&!b.declaresType(x);b=b.parent);return b},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},c}function BM(t){var e=t.use(br),r=e.namedTypes,n=e.builders,i=e.builtInTypes.number,s=e.builtInTypes.array,o=t.use(OM),a=t.use(yue);let c=function y(v,D,E){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,v,D,E)};var u=c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(u,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),u.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},u.prune=function(){var y=this.parent;return this.replace(),f(y)},u._computeNode=function(){var y=this.value;if(r.Node.check(y))return y;var v=this.parentPath;return v&&v.node||null},u._computeParent=function(){var y=this.value,v=this.parentPath;if(!r.Node.check(y)){for(;v&&!r.Node.check(v.value);)v=v.parentPath;v&&(v=v.parentPath)}for(;v&&!r.Node.check(v.value);)v=v.parentPath;return v||null},u._computeScope=function(){var y=this.value,v=this.parentPath,D=v&&v.scope;return r.Node.check(y)&&a.isEstablishedBy(y)&&(D=new a(this,D)),D||null},u.getValueProperty=function(y){return e.getFieldValue(this.value,y)},u.needsParens=function(y){var v=this.parentPath;if(!v)return!1;var D=this.value;if(!r.Expression.check(D)||D.type==="Identifier")return!1;for(;!r.Node.check(v.value);)if(v=v.parentPath,!v)return!1;var E=v.value;switch(D.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return E.type==="MemberExpression"&&this.name==="object"&&E.object===D;case"BinaryExpression":case"LogicalExpression":switch(E.type){case"CallExpression":return this.name==="callee"&&E.callee===D;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&E.object===D;case"BinaryExpression":case"LogicalExpression":{let x=D,b=E.operator,C=p[b],w=x.operator,F=p[w];if(C>F)return!0;if(C===F&&this.name==="right"){if(E.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(E.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(E.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return E.type==="MemberExpression"&&i.check(D.value)&&this.name==="object"&&E.object===D;case"AssignmentExpression":case"ConditionalExpression":switch(E.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&E.callee===D;case"ConditionalExpression":return this.name==="test"&&E.test===D;case"MemberExpression":return this.name==="object"&&E.object===D;default:return!1}default:if(E.type==="NewExpression"&&this.name==="callee"&&E.callee===D)return d(D)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function l(y){return r.BinaryExpression.check(y)||r.LogicalExpression.check(y)}var p={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(y,v){y.forEach(function(D){p[D]=v})});function d(y){return r.CallExpression.check(y)?!0:s.check(y)?y.some(d):r.Node.check(y)?e.someField(y,function(v,D){return d(D)}):!1}u.canBeFirstInStatement=function(){var y=this.node;return!r.FunctionExpression.check(y)&&!r.ObjectExpression.check(y)},u.firstInStatement=function(){return m(this)};function m(y){for(var v,D;y.parent;y=y.parent){if(v=y.node,D=y.parent.node,r.BlockStatement.check(D)&&y.parent.name==="body"&&y.name===0){if(D.body[0]!==v)throw new Error("Nodes must be equal");return!0}if(r.ExpressionStatement.check(D)&&y.name==="expression"){if(D.expression!==v)throw new Error("Nodes must be equal");return!0}if(r.SequenceExpression.check(D)&&y.parent.name==="expressions"&&y.name===0){if(D.expressions[0]!==v)throw new Error("Nodes must be equal");continue}if(r.CallExpression.check(D)&&y.name==="callee"){if(D.callee!==v)throw new Error("Nodes must be equal");continue}if(r.MemberExpression.check(D)&&y.name==="object"){if(D.object!==v)throw new Error("Nodes must be equal");continue}if(r.ConditionalExpression.check(D)&&y.name==="test"){if(D.test!==v)throw new Error("Nodes must be equal");continue}if(l(D)&&y.name==="left"){if(D.left!==v)throw new Error("Nodes must be equal");continue}if(r.UnaryExpression.check(D)&&!D.prefix&&y.name==="argument"){if(D.argument!==v)throw new Error("Nodes must be equal");continue}return!1}return!0}function f(y){if(r.VariableDeclaration.check(y.node)){var v=y.get("declarations").value;if(!v||v.length===0)return y.prune()}else if(r.ExpressionStatement.check(y.node)){if(!y.get("expression").value)return y.prune()}else r.IfStatement.check(y.node)&&g(y);return y}function g(y){var v=y.get("test").value,D=y.get("alternate").value,E=y.get("consequent").value;if(!E&&!D){var x=n.expressionStatement(v);y.replace(x)}else if(!E&&D){var b=n.unaryExpression("!",v,!0);r.UnaryExpression.check(v)&&v.operator==="!"&&(b=v.argument),y.get("test").replace(b),y.get("consequent").replace(D),y.get("alternate").replace()}}return c}function vue(t){var e=t.use(br),r=t.use(BM),n=e.builtInTypes.array,i=e.builtInTypes.object,s=e.builtInTypes.function,o;let a=function f(){if(!(this instanceof f))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=c(this),this._shouldVisitComments=py.call(this._methodNameTable,"Block")||py.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function c(f){var g=Object.create(null);for(var y in f)/^visit[A-Z]/.test(y)&&(g[y.slice(5)]=!0);for(var v=e.computeSupertypeLookupTable(g),D=Object.create(null),E=Object.keys(v),x=E.length,b=0;b<x;++b){var C=E[b];y="visit"+v[C],s.check(f[y])&&(D[C]=y)}return D}a.fromMethodsObject=function(g){if(g instanceof a)return g;if(!i.check(g))return new a;let y=function D(){if(!(this instanceof D))throw new Error("Visitor constructor cannot be invoked without 'new'");a.call(this)};var v=y.prototype=Object.create(l);return v.constructor=y,u(v,g),u(y,a),s.assert(y.fromMethodsObject),s.assert(y.visit),new y};function u(f,g){for(var y in g)py.call(g,y)&&(f[y]=g[y]);return f}a.visit=function(g,y){return a.fromMethodsObject(y).visit(g)};var l=a.prototype;l.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var f=arguments.length,g=new Array(f),y=0;y<f;++y)g[y]=arguments[y];g[0]instanceof r||(g[0]=new r({root:g[0]}).get("root")),this.reset.apply(this,g);var v;try{var D=this.visitWithoutReset(g[0]);v=!0}finally{if(this._visiting=!1,!v&&this._abortRequested)return g[0].value}return D},l.AbortRequest=function(){},l.abort=function(){var f=this;f._abortRequested=!0;var g=new f.AbortRequest;throw g.cancel=function(){f._abortRequested=!1},g},l.reset=function(f){},l.visitWithoutReset=function(f){if(this instanceof this.Context)return this.visitor.visitWithoutReset(f);if(!(f instanceof r))throw new Error("");var g=f.value,y=g&&typeof g=="object"&&typeof g.type=="string"&&this._methodNameTable[g.type];if(y){var v=this.acquireContext(f);try{return v.invokeVisitorMethod(y)}finally{this.releaseContext(v)}}else return p(f,this)};function p(f,g){if(!(f instanceof r))throw new Error("");if(!(g instanceof a))throw new Error("");var y=f.value;if(n.check(y))f.each(g.visitWithoutReset,g);else if(i.check(y)){var v=e.getFieldNames(y);g._shouldVisitComments&&y.comments&&v.indexOf("comments")<0&&v.push("comments");for(var D=v.length,E=[],x=0;x<D;++x){var b=v[x];py.call(y,b)||(y[b]=e.getFieldValue(y,b)),E.push(f.get(b))}for(var x=0;x<D;++x)g.visitWithoutReset(E[x])}return f.value}l.acquireContext=function(f){return this._reusableContextStack.length===0?new this.Context(f):this._reusableContextStack.pop().reset(f)},l.releaseContext=function(f){if(!(f instanceof this.Context))throw new Error("");this._reusableContextStack.push(f),f.currentPath=null},l.reportChanged=function(){this._changeReported=!0},l.wasChangeReported=function(){return this._changeReported};function d(f){function g(v){if(!(this instanceof g))throw new Error("");if(!(this instanceof a))throw new Error("");if(!(v instanceof r))throw new Error("");Object.defineProperty(this,"visitor",{value:f,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=v,this.needToCallTraverse=!0,Object.seal(this)}if(!(f instanceof a))throw new Error("");var y=g.prototype=Object.create(f);return y.constructor=g,u(y,m),g}var m=Object.create(null);return m.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},m.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");var y=this.visitor[g].call(this,this.currentPath);if(y===!1?this.needToCallTraverse=!1:y!==o&&(this.currentPath=this.currentPath.replace(y)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var v=this.currentPath;return v&&v.value},m.traverse=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");return this.needToCallTraverse=!1,p(g,a.fromMethodsObject(y||this.visitor))},m.visit=function(g,y){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof r))throw new Error("");if(!(this.currentPath instanceof r))throw new Error("");return this.needToCallTraverse=!1,a.fromMethodsObject(y||this.visitor).visitWithoutReset(g)},m.reportChanged=function(){this.visitor.reportChanged()},m.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},a}function bue(t){var e=t.use(br),r=e.getFieldNames,n=e.getFieldValue,i=e.builtInTypes.array,s=e.builtInTypes.object,o=e.builtInTypes.Date,a=e.builtInTypes.RegExp,c=Object.prototype.hasOwnProperty;function u(f,g,y){return i.check(y)?y.length=0:y=null,p(f,g,y)}u.assert=function(f,g){var y=[];if(!u(f,g,y))if(y.length===0){if(f!==g)throw new Error("Nodes must be equal")}else throw new Error("Nodes differ in the following path: "+y.map(l).join(""))};function l(f){return/[_$a-z][_$a-z0-9]*/i.test(f)?"."+f:"["+JSON.stringify(f)+"]"}function p(f,g,y){return f===g?!0:i.check(f)?d(f,g,y):s.check(f)?m(f,g,y):o.check(f)?o.check(g)&&+f==+g:a.check(f)?a.check(g)&&f.source===g.source&&f.global===g.global&&f.multiline===g.multiline&&f.ignoreCase===g.ignoreCase:f==g}function d(f,g,y){i.assert(f);var v=f.length;if(!i.check(g)||g.length!==v)return y&&y.push("length"),!1;for(var D=0;D<v;++D){if(y&&y.push(D),D in f!=D in g||!p(f[D],g[D],y))return!1;if(y){var E=y.pop();if(E!==D)throw new Error(""+E)}}return!0}function m(f,g,y){if(s.assert(f),!s.check(g))return!1;if(f.type!==g.type)return y&&y.push("type"),!1;var v=r(f),D=v.length,E=r(g),x=E.length;if(D===x){for(var b=0;b<D;++b){var C=v[b],w=n(f,C),F=n(g,C);if(y&&y.push(C),!p(w,F,y))return!1;if(y){var P=y.pop();if(P!==C)throw new Error(""+P)}}return!0}if(!y)return!1;var A=Object.create(null);for(b=0;b<D;++b)A[v[b]]=!0;for(b=0;b<x;++b){if(C=E[b],!c.call(A,C))return y.push(C),!1;delete A[C]}for(C in A){y.push(C);break}return!1}return u}function xue(t){let e=Due(),r=e.use(br);t.forEach(e.use),r.finalize();let n=e.use(vue);return{Type:r.Type,builtInTypes:r.builtInTypes,namedTypes:r.namedTypes,builders:r.builders,defineMethod:r.defineMethod,getFieldNames:r.getFieldNames,getFieldValue:r.getFieldValue,eachField:r.eachField,someField:r.someField,getSupertypeNames:r.getSupertypeNames,getBuilderName:r.getBuilderName,astNodesAreEquivalent:e.use(bue),finalize:r.finalize,Path:e.use(OM),NodePath:e.use(BM),PathVisitor:n,use:e.use,visit:n.visit}}function Due(){let t=[],e=[];function r(i){var s=t.indexOf(i);return s===-1&&(s=t.length,t.push(i),e[s]=i(n)),e[s]}var n={use:r};return n}function MM(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}function LM(t){let e=t.use(MM);return e.BinaryOperators.indexOf("**")<0&&e.BinaryOperators.push("**"),e.AssignmentOperators.indexOf("**=")<0&&e.AssignmentOperators.push("**="),e}function $M(t){let e=t.use(LM);return e.LogicalOperators.indexOf("??")<0&&e.LogicalOperators.push("??"),e}function Eue(t){let e=t.use($M);return e.LogicalOperators.forEach(r=>{let n=r+"=";e.AssignmentOperators.indexOf(n)<0&&e.AssignmentOperators.push(n)}),e}function Cue(t){var e=t.use(br),r=e.Type,n=r.def,i=r.or,s=t.use(Di),o=s.defaults,a=s.geq;let{BinaryOperators:c,AssignmentOperators:u,LogicalOperators:l}=t.use(MM);n("Printable").field("loc",i(n("SourceLocation"),null),o.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),o.null,!0),n("SourceLocation").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),o.null),n("Position").field("line",a(1)).field("column",a(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),o.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),o.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("generator",Boolean,o.false).field("async",Boolean,o.false),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),o.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),o.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,o.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],o.emptyArray).field("finalizer",i(n("BlockStatement"),null),o.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),o.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null),o.null),n("Expression").bases("Node"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var p=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean,o.true);let d=i(...c);n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",n("Expression")).field("right",n("Expression"));let m=i(...u);n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",m).field("left",i(n("Pattern"),n("MemberExpression"))).field("right",n("Expression"));var f=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",f).field("argument",n("Expression")).field("prefix",Boolean);var g=i(...l);n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var y=this.property.type;return y==="Literal"||y==="MemberExpression"||y==="BinaryExpression"}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,o.false),n("Literal").bases("Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp,BigInt)),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}function wue(t){t.use(Cue);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("Function").field("generator",Boolean,i.false).field("expression",Boolean,i.false).field("defaults",[n(r("Expression"),null)],i.emptyArray).field("rest",n(r("Identifier"),null),i.null),r("RestElement").bases("Pattern").build("argument").field("argument",r("Pattern")).field("typeAnnotation",n(r("TypeAnnotation"),r("TSTypeAnnotation"),null),i.null),r("SpreadElementPattern").bases("Pattern").build("argument").field("argument",r("Pattern")),r("FunctionDeclaration").build("id","params","body","generator","expression").field("id",n(r("Identifier"),null)),r("FunctionExpression").build("id","params","body","generator","expression"),r("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,i.null).field("body",n(r("BlockStatement"),r("Expression"))).field("generator",!1,i.false),r("ForOfStatement").bases("Statement").build("left","right","body").field("left",n(r("VariableDeclaration"),r("Pattern"))).field("right",r("Expression")).field("body",r("Statement")),r("YieldExpression").bases("Expression").build("argument","delegate").field("argument",n(r("Expression"),null)).field("delegate",Boolean,i.false),r("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",n(r("Expression"),null)),r("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",r("Expression")).field("blocks",[r("ComprehensionBlock")]).field("filter",n(r("Expression"),null)),r("ComprehensionBlock").bases("Node").build("left","right","each").field("left",r("Pattern")).field("right",r("Expression")).field("each",Boolean),r("Property").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("value",n(r("Expression"),r("Pattern"))).field("method",Boolean,i.false).field("shorthand",Boolean,i.false).field("computed",Boolean,i.false),r("ObjectProperty").field("shorthand",Boolean,i.false),r("PropertyPattern").bases("Pattern").build("key","pattern").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("pattern",r("Pattern")).field("computed",Boolean,i.false),r("ObjectPattern").bases("Pattern").build("properties").field("properties",[n(r("PropertyPattern"),r("Property"))]),r("ArrayPattern").bases("Pattern").build("elements").field("elements",[n(r("Pattern"),null)]),r("SpreadElement").bases("Node").build("argument").field("argument",r("Expression")),r("ArrayExpression").field("elements",[n(r("Expression"),r("SpreadElement"),r("RestElement"),null)]),r("NewExpression").field("arguments",[n(r("Expression"),r("SpreadElement"))]),r("CallExpression").field("arguments",[n(r("Expression"),r("SpreadElement"))]),r("AssignmentPattern").bases("Pattern").build("left","right").field("left",r("Pattern")).field("right",r("Expression")),r("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",n("constructor","method","get","set")).field("key",r("Expression")).field("value",r("Function")).field("computed",Boolean,i.false).field("static",Boolean,i.false);let s=n(r("MethodDefinition"),r("VariableDeclarator"),r("ClassPropertyDefinition"),r("ClassProperty"),r("StaticBlock"));r("ClassProperty").bases("Declaration").build("key").field("key",n(r("Literal"),r("Identifier"),r("Expression"))).field("computed",Boolean,i.false),r("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",s),r("ClassBody").bases("Declaration").build("body").field("body",[s]),r("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",n(r("Identifier"),null)).field("body",r("ClassBody")).field("superClass",n(r("Expression"),null),i.null),r("ClassExpression").bases("Expression").build("id","body","superClass").field("id",n(r("Identifier"),null),i.null).field("body",r("ClassBody")).field("superClass",n(r("Expression"),null),i.null),r("Super").bases("Expression").build(),r("Specifier").bases("Node"),r("ModuleSpecifier").bases("Specifier").field("local",n(r("Identifier"),null),i.null).field("id",n(r("Identifier"),null),i.null).field("name",n(r("Identifier"),null),i.null),r("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",r("Identifier")),r("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),r("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),r("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[n(r("ImportSpecifier"),r("ImportNamespaceSpecifier"),r("ImportDefaultSpecifier"))],i.emptyArray).field("source",r("Literal")).field("importKind",n("value","type"),function(){return"value"}),r("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",n(r("Declaration"),null)).field("specifiers",[r("ExportSpecifier")],i.emptyArray).field("source",n(r("Literal"),null),i.null),r("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",r("Identifier")),r("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",n(r("Declaration"),r("Expression"))),r("ExportAllDeclaration").bases("Declaration").build("source").field("source",r("Literal")),r("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",r("Expression")).field("quasi",r("TemplateLiteral")),r("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[r("TemplateElement")]).field("expressions",[r("Expression")]),r("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),r("MetaProperty").bases("Expression").build("meta","property").field("meta",r("Identifier")).field("property",r("Identifier"))}function Sue(t){t.use(LM),t.use(wue)}function Tue(t){t.use(Sue);let r=t.use(br).Type.def,n=t.use(Di).defaults;r("Function").field("async",Boolean,n.false),r("AwaitExpression").bases("Expression").build("argument").field("argument",r("Expression"))}function Pue(t){t.use(Tue);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("ForOfStatement").field("await",Boolean,i.false),r("SpreadProperty").bases("Node").build("argument").field("argument",r("Expression")),r("ObjectExpression").field("properties",[n(r("Property"),r("SpreadProperty"),r("SpreadElement"))]),r("TemplateElement").field("value",{cooked:n(String,null),raw:String}),r("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",r("Pattern")),r("ObjectPattern").field("properties",[n(r("PropertyPattern"),r("Property"),r("RestElement"),r("SpreadPropertyPattern"))])}function Aue(t){t.use(Pue);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("CatchClause").field("param",n(r("Pattern"),null),i.null)}function _ue(t){t.use($M),t.use(Aue);let e=t.use(br),r=e.Type.def,n=e.Type.or,s=t.use(Di).defaults;r("ImportExpression").bases("Expression").build("source").field("source",r("Expression")),r("ExportAllDeclaration").bases("Declaration").build("source","exported").field("source",r("Literal")).field("exported",n(r("Identifier"),null,void 0),s.null),r("ChainElement").bases("Node").field("optional",Boolean,s.false),r("CallExpression").bases("Expression","ChainElement"),r("MemberExpression").bases("Expression","ChainElement"),r("ChainExpression").bases("Expression").build("expression").field("expression",r("ChainElement")),r("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,s.true),r("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,s.true)}function Fue(t){t.use(Eue),t.use(_ue)}function kue(t){t.use(Fue);let r=t.use(br).Type.def;r("StaticBlock").bases("Declaration").build("body").field("body",[r("Statement")])}function Uf(t){t.use(kue);let e=t.use(br),r=e.Type,n=e.Type.def,i=r.or,o=t.use(Di).defaults;n("AwaitExpression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,o.false),n("Decorator").bases("Node").build("expression").field("expression",n("Expression")),n("Property").field("decorators",i([n("Decorator")],null),o.null),n("MethodDefinition").field("decorators",i([n("Decorator")],null),o.null),n("PrivateName").bases("Expression","Pattern").build("id").field("id",n("Identifier")),n("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",n("PrivateName")).field("value",i(n("Expression"),null),o.null),n("ImportAttribute").bases("Node").build("key","value").field("key",i(n("Identifier"),n("Literal"))).field("value",n("Expression")),["ImportDeclaration","ExportAllDeclaration","ExportNamedDeclaration"].forEach(a=>{n(a).field("assertions",[n("ImportAttribute")],o.emptyArray)}),n("RecordExpression").bases("Expression").build("properties").field("properties",[i(n("ObjectProperty"),n("ObjectMethod"),n("SpreadElement"))]),n("TupleExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),n("SpreadElement"),null)]),n("ModuleExpression").bases("Node").build("body").field("body",n("Program"))}function Iue(t){t.use(Uf);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("JSXAttribute").bases("Node").build("name","value").field("name",n(r("JSXIdentifier"),r("JSXNamespacedName"))).field("value",n(r("Literal"),r("JSXExpressionContainer"),r("JSXElement"),r("JSXFragment"),null),i.null),r("JSXIdentifier").bases("Identifier").build("name").field("name",String),r("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",r("JSXIdentifier")).field("name",r("JSXIdentifier")),r("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",n(r("JSXIdentifier"),r("JSXMemberExpression"))).field("property",r("JSXIdentifier")).field("computed",Boolean,i.false);let s=n(r("JSXIdentifier"),r("JSXNamespacedName"),r("JSXMemberExpression"));r("JSXSpreadAttribute").bases("Node").build("argument").field("argument",r("Expression"));let o=[n(r("JSXAttribute"),r("JSXSpreadAttribute"))];r("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n(r("Expression"),r("JSXEmptyExpression")));let a=[n(r("JSXText"),r("JSXExpressionContainer"),r("JSXSpreadChild"),r("JSXElement"),r("JSXFragment"),r("Literal"))];r("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",r("JSXOpeningElement")).field("closingElement",n(r("JSXClosingElement"),null),i.null).field("children",a,i.emptyArray).field("name",s,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),r("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",s).field("attributes",o,i.emptyArray).field("selfClosing",Boolean,i.false),r("JSXClosingElement").bases("Node").build("name").field("name",s),r("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",r("JSXOpeningFragment")).field("closingFragment",r("JSXClosingFragment")).field("children",a,i.emptyArray),r("JSXOpeningFragment").bases("Node").build(),r("JSXClosingFragment").bases("Node").build(),r("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,function(){return this.value}),r("JSXEmptyExpression").bases("Node").build(),r("JSXSpreadChild").bases("Node").build("expression").field("expression",r("Expression"))}function jM(t){var e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults,s=n(r("TypeAnnotation"),r("TSTypeAnnotation"),null),o=n(r("TypeParameterDeclaration"),r("TSTypeParameterDeclaration"),null);r("Identifier").field("typeAnnotation",s,i.null),r("ObjectPattern").field("typeAnnotation",s,i.null),r("Function").field("returnType",s,i.null).field("typeParameters",o,i.null),r("ClassProperty").build("key","value","typeAnnotation","static").field("value",n(r("Expression"),null)).field("static",Boolean,i.false).field("typeAnnotation",s,i.null),["ClassDeclaration","ClassExpression"].forEach(a=>{r(a).field("typeParameters",o,i.null).field("superTypeParameters",n(r("TypeParameterInstantiation"),r("TSTypeParameterInstantiation"),null),i.null).field("implements",n([r("ClassImplements")],[r("TSExpressionWithTypeArguments")]),i.emptyArray)})}function UM(t){t.use(Uf),t.use(jM);let e=t.use(br),r=e.Type.def,n=e.Type.or,i=t.use(Di).defaults;r("Flow").bases("Node"),r("FlowType").bases("Flow"),r("AnyTypeAnnotation").bases("FlowType").build(),r("EmptyTypeAnnotation").bases("FlowType").build(),r("MixedTypeAnnotation").bases("FlowType").build(),r("VoidTypeAnnotation").bases("FlowType").build(),r("SymbolTypeAnnotation").bases("FlowType").build(),r("NumberTypeAnnotation").bases("FlowType").build(),r("BigIntTypeAnnotation").bases("FlowType").build(),r("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),r("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),r("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),r("StringTypeAnnotation").bases("FlowType").build(),r("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),r("BooleanTypeAnnotation").bases("FlowType").build(),r("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),r("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",r("FlowType")),r("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",r("FlowType")),r("NullLiteralTypeAnnotation").bases("FlowType").build(),r("NullTypeAnnotation").bases("FlowType").build(),r("ThisTypeAnnotation").bases("FlowType").build(),r("ExistsTypeAnnotation").bases("FlowType").build(),r("ExistentialTypeParam").bases("FlowType").build(),r("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[r("FunctionTypeParam")]).field("returnType",r("FlowType")).field("rest",n(r("FunctionTypeParam"),null)).field("typeParameters",n(r("TypeParameterDeclaration"),null)),r("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n(r("Identifier"),null)).field("typeAnnotation",r("FlowType")).field("optional",Boolean),r("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",r("FlowType")),r("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[n(r("ObjectTypeProperty"),r("ObjectTypeSpreadProperty"))]).field("indexers",[r("ObjectTypeIndexer")],i.emptyArray).field("callProperties",[r("ObjectTypeCallProperty")],i.emptyArray).field("inexact",n(Boolean,void 0),i.undefined).field("exact",Boolean,i.false).field("internalSlots",[r("ObjectTypeInternalSlot")],i.emptyArray),r("Variance").bases("Node").build("kind").field("kind",n("plus","minus"));let s=n(r("Variance"),"plus","minus",null);r("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",n(r("Literal"),r("Identifier"))).field("value",r("FlowType")).field("optional",Boolean).field("variance",s,i.null),r("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",r("Identifier")).field("key",r("FlowType")).field("value",r("FlowType")).field("variance",s,i.null).field("static",Boolean,i.false),r("ObjectTypeCallProperty").bases("Node").build("value").field("value",r("FunctionTypeAnnotation")).field("static",Boolean,i.false),r("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",n(r("Identifier"),r("QualifiedTypeIdentifier"))).field("id",r("Identifier")),r("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",n(r("Identifier"),r("QualifiedTypeIdentifier"))).field("typeParameters",n(r("TypeParameterInstantiation"),null)),r("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",r("Identifier")).field("property",n(r("MemberTypeAnnotation"),r("GenericTypeAnnotation"))),r("IndexedAccessType").bases("FlowType").build("objectType","indexType").field("objectType",r("FlowType")).field("indexType",r("FlowType")),r("OptionalIndexedAccessType").bases("FlowType").build("objectType","indexType","optional").field("objectType",r("FlowType")).field("indexType",r("FlowType")).field("optional",Boolean),r("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",r("FlowType")),r("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",r("FlowType")),r("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",r("Identifier")).field("value",r("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),r("TypeParameterDeclaration").bases("Node").build("params").field("params",[r("TypeParameter")]),r("TypeParameterInstantiation").bases("Node").build("params").field("params",[r("FlowType")]),r("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",s,i.null).field("bound",n(r("TypeAnnotation"),null),i.null).field("default",n(r("FlowType"),null),i.null),r("ClassProperty").field("variance",s,i.null),r("ClassImplements").bases("Node").build("id").field("id",r("Identifier")).field("superClass",n(r("Expression"),null),i.null).field("typeParameters",n(r("TypeParameterInstantiation"),null),i.null),r("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",r("ObjectTypeAnnotation")).field("extends",n([r("InterfaceExtends")],null),i.null),r("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null),i.null).field("body",r("ObjectTypeAnnotation")).field("extends",[r("InterfaceExtends")]),r("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),r("InterfaceExtends").bases("Node").build("id").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterInstantiation"),null),i.null),r("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null)).field("right",r("FlowType")),r("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),r("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",r("Identifier")).field("typeParameters",n(r("TypeParameterDeclaration"),null)).field("impltype",r("FlowType")).field("supertype",n(r("FlowType"),null)),r("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",n(r("FlowType"),null)),r("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",r("Expression")).field("typeAnnotation",r("TypeAnnotation")),r("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[r("FlowType")]),r("DeclareVariable").bases("Statement").build("id").field("id",r("Identifier")),r("DeclareFunction").bases("Statement").build("id").field("id",r("Identifier")).field("predicate",n(r("FlowPredicate"),null),i.null),r("DeclareClass").bases("InterfaceDeclaration").build("id"),r("DeclareModule").bases("Statement").build("id","body").field("id",n(r("Identifier"),r("Literal"))).field("body",r("BlockStatement")),r("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",r("TypeAnnotation")),r("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",n(r("DeclareVariable"),r("DeclareFunction"),r("DeclareClass"),r("FlowType"),r("TypeAlias"),r("DeclareOpaqueType"),r("InterfaceDeclaration"),null)).field("specifiers",[n(r("ExportSpecifier"),r("ExportBatchSpecifier"))],i.emptyArray).field("source",n(r("Literal"),null),i.null),r("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",n(r("Literal"),null),i.null),r("ImportDeclaration").field("importKind",n("value","type","typeof"),()=>"value"),r("FlowPredicate").bases("Flow"),r("InferredPredicate").bases("FlowPredicate").build(),r("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",r("Expression")),r("Function").field("predicate",n(r("FlowPredicate"),null),i.null),r("CallExpression").field("typeArguments",n(null,r("TypeParameterInstantiation")),i.null),r("NewExpression").field("typeArguments",n(null,r("TypeParameterInstantiation")),i.null),r("EnumDeclaration").bases("Declaration").build("id","body").field("id",r("Identifier")).field("body",n(r("EnumBooleanBody"),r("EnumNumberBody"),r("EnumStringBody"),r("EnumSymbolBody"))),r("EnumBooleanBody").build("members","explicitType").field("members",[r("EnumBooleanMember")]).field("explicitType",Boolean),r("EnumNumberBody").build("members","explicitType").field("members",[r("EnumNumberMember")]).field("explicitType",Boolean),r("EnumStringBody").build("members","explicitType").field("members",n([r("EnumStringMember")],[r("EnumDefaultedMember")])).field("explicitType",Boolean),r("EnumSymbolBody").build("members").field("members",[r("EnumDefaultedMember")]),r("EnumBooleanMember").build("id","init").field("id",r("Identifier")).field("init",n(r("Literal"),Boolean)),r("EnumNumberMember").build("id","init").field("id",r("Identifier")).field("init",r("Literal")),r("EnumStringMember").build("id","init").field("id",r("Identifier")).field("init",r("Literal")),r("EnumDefaultedMember").build("id").field("id",r("Identifier"))}function Nue(t){t.use(Uf);var e=t.use(br),r=t.use(Di).defaults,n=e.Type.def,i=e.Type.or;n("VariableDeclaration").field("declarations",[i(n("VariableDeclarator"),n("Identifier"))]),n("Property").field("value",i(n("Expression"),n("Pattern"))),n("ArrayPattern").field("elements",[i(n("Pattern"),n("SpreadElement"),null)]),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"))]),n("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),n("ExportBatchSpecifier").bases("Specifier").build(),n("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("Declaration"),n("Expression"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],r.emptyArray).field("source",i(n("Literal"),null),r.null),n("Block").bases("Comment").build("value","leading","trailing"),n("Line").bases("Comment").build("value","leading","trailing")}function qM(t){t.use(Uf);let e=t.use(br),r=t.use(Di).defaults,n=e.Type.def,i=e.Type.or,{undefined:s}=e.builtInTypes;n("Noop").bases("Statement").build(),n("DoExpression").bases("Expression").build("body").field("body",[n("Statement")]),n("BindExpression").bases("Expression").build("object","callee").field("object",i(n("Expression"),null)).field("callee",n("Expression")),n("ParenthesizedExpression").bases("Expression").build("expression").field("expression",n("Expression")),n("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",n("Identifier")),n("CommentBlock").bases("Comment").build("value","leading","trailing"),n("CommentLine").bases("Comment").build("value","leading","trailing"),n("Directive").bases("Node").build("value").field("value",n("DirectiveLiteral")),n("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,r["use strict"]),n("InterpreterDirective").bases("Node").build("value").field("value",String),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],r.emptyArray),n("Program").bases("Node").build("body").field("body",[n("Statement")]).field("directives",[n("Directive")],r.emptyArray).field("interpreter",i(n("InterpreterDirective"),null),r.null);function o(l=String,p){return["extra",{rawValue:l,raw:String},function(){let m=e.getFieldValue(this,"value");return{rawValue:m,raw:p?p(m):String(m)}}]}n("StringLiteral").bases("Literal").build("value").field("value",String).field(...o(String,l=>JSON.stringify(l))),n("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",i(String,null),r.null).field(...o(Number)),n("BigIntLiteral").bases("Literal").build("value").field("value",i(String,Number)).field(...o(String,l=>l+"n")),n("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,l=>l+"m")),n("NullLiteral").bases("Literal").build().field("value",null,r.null),n("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),n("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,function(){return new RegExp(this.pattern,this.flags)}).field(...o(i(RegExp,s),l=>`/${l.pattern}/${l.flags||""}`)).field("regex",{pattern:String,flags:String},function(){return{pattern:this.pattern,flags:this.flags}});var a=i(n("Property"),n("ObjectMethod"),n("ObjectProperty"),n("SpreadProperty"),n("SpreadElement"));n("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),n("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",i("method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("computed",Boolean,r.false).field("generator",Boolean,r.false).field("async",Boolean,r.false).field("accessibility",i(n("Literal"),null),r.null).field("decorators",i([n("Decorator")],null),r.null),n("ObjectProperty").bases("Node").build("key","value").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("accessibility",i(n("Literal"),null),r.null).field("computed",Boolean,r.false);var c=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("ClassAccessorProperty"),n("StaticBlock"));n("ClassBody").bases("Declaration").build("body").field("body",[c]),n("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",i(n("Literal"),n("Identifier"),n("Expression"))),n("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",n("PrivateName")),n("ClassAccessorProperty").bases("Declaration").build("key","value","decorators","computed","static").field("key",i(n("Literal"),n("Identifier"),n("PrivateName"),n("Expression"))).field("value",i(n("Expression"),null),r.null),["ClassMethod","ClassPrivateMethod"].forEach(l=>{n(l).field("kind",i("get","set","method","constructor"),()=>"method").field("body",n("BlockStatement")).field("access",i("public","private","protected",null),r.null)}),["ClassMethod","ClassPrivateMethod","ClassAccessorProperty"].forEach(l=>{n(l).field("computed",Boolean,r.false).field("static",Boolean,r.false).field("abstract",Boolean,r.false).field("accessibility",i("public","private","protected",null),r.null).field("decorators",i([n("Decorator")],null),r.null).field("definite",Boolean,r.false).field("optional",Boolean,r.false).field("override",Boolean,r.false).field("readonly",Boolean,r.false)});var u=i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"),n("ObjectProperty"),n("RestProperty"),n("RestElement"));n("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",i([n("Decorator")],null),r.null),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("RestProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("Import").bases("Expression").build()}function Rue(t){let r=t.use(br).Type.def;t.use(qM),t.use(UM),r("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),r("TopicReference").bases("Expression").build()}function Oue(t){t.use(qM),t.use(jM);var e=t.use(br),r=e.namedTypes,n=e.Type.def,i=e.Type.or,s=t.use(Di).defaults,o=e.Type.from(function(l,p){return!!(r.StringLiteral&&r.StringLiteral.check(l,p)||r.Literal&&r.Literal.check(l,p)&&typeof l.value=="string")},"StringLiteral");n("TSType").bases("Node");var a=i(n("Identifier"),n("TSQualifiedName"));n("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",a),n("TSHasOptionalTypeParameterInstantiation").field("typeParameters",i(n("TSTypeParameterInstantiation"),null),s.null),n("TSHasOptionalTypeParameters").field("typeParameters",i(n("TSTypeParameterDeclaration"),null,void 0),s.null),n("TSHasOptionalTypeAnnotation").field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null),n("TSQualifiedName").bases("Node").build("left","right").field("left",a).field("right",a),n("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSSatisfiesExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TSType")),n("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",n("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSIntrinsicKeyword","TSThisType"].forEach(l=>{n(l).bases("TSType").build()}),n("TSArrayType").bases("TSType").build("elementType").field("elementType",n("TSType")),n("TSLiteralType").bases("TSType").build("literal").field("literal",i(n("NumericLiteral"),n("StringLiteral"),n("BooleanLiteral"),n("TemplateLiteral"),n("UnaryExpression"),n("BigIntLiteral"))),n("TemplateLiteral").field("expressions",i([n("Expression")],[n("TSType")])),["TSUnionType","TSIntersectionType"].forEach(l=>{n(l).bases("TSType").build("types").field("types",[n("TSType")])}),n("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",n("TSType")).field("extendsType",n("TSType")).field("trueType",n("TSType")).field("falseType",n("TSType")),n("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",n("TSTypeParameter")),n("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType"));var c=[i(n("Identifier"),n("RestElement"),n("ArrayPattern"),n("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach(l=>{n(l).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",c)}),n("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,s.false).field("async",Boolean,s.false).field("generator",Boolean,s.false).field("id",i(n("Identifier"),null),s.null).field("params",[n("Pattern")]).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,s.false).field("generator",Boolean,s.false).field("params",[n("Pattern")]).field("abstract",Boolean,s.false).field("accessibility",i("public","private","protected",void 0),s.undefined).field("static",Boolean,s.false).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("key",i(n("Identifier"),n("StringLiteral"),n("NumericLiteral"),n("Expression"))).field("kind",i("get","set","method","constructor"),function(){return"method"}).field("access",i("public","private","protected",void 0),s.undefined).field("decorators",i([n("Decorator")],null),s.null).field("returnType",i(n("TSTypeAnnotation"),n("Noop"),null),s.null),n("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",i(Boolean,"+","-"),s.false).field("typeParameter",n("TSTypeParameter")).field("optional",i(Boolean,"+","-"),s.false).field("typeAnnotation",i(n("TSType"),null),s.null),n("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[i(n("TSType"),n("TSNamedTupleMember"))]),n("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",n("Identifier")).field("optional",Boolean,s.false).field("elementType",n("TSType")),n("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",n("TSType")),n("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",n("TSType")).field("indexType",n("TSType")),n("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",n("TSType")),n("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",i(n("TSType"),n("TSTypeAnnotation"))),n("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[n("Identifier")]).field("readonly",Boolean,s.false),n("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",n("Expression")).field("computed",Boolean,s.false).field("readonly",Boolean,s.false).field("optional",Boolean,s.false).field("initializer",i(n("Expression"),null),s.null),n("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",n("Expression")).field("computed",Boolean,s.false).field("optional",Boolean,s.false).field("parameters",c),n("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",i(n("Identifier"),n("TSThisType"))).field("typeAnnotation",i(n("TSTypeAnnotation"),null),s.null).field("asserts",Boolean,s.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach(l=>{n(l).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",c)}),n("TSEnumMember").bases("Node").build("id","initializer").field("id",i(n("Identifier"),o)).field("initializer",i(n("Expression"),null),s.null),n("TSTypeQuery").bases("TSType").build("exprName").field("exprName",i(a,n("TSImportType")));var u=i(n("TSCallSignatureDeclaration"),n("TSConstructSignatureDeclaration"),n("TSIndexSignature"),n("TSMethodSignature"),n("TSPropertySignature"));n("TSTypeLiteral").bases("TSType").build("members").field("members",[u]),n("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",i(n("Identifier"),String)).field("constraint",i(n("TSType"),void 0),s.undefined).field("default",i(n("TSType"),void 0),s.undefined),n("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",n("TSType")).field("expression",n("Expression")).field("extra",i({parenthesized:Boolean},null),s.null),n("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[n("TSTypeParameter")]),n("TSInstantiationExpression").bases("Expression","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",n("Expression")),n("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[n("TSType")]),n("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",n("Identifier")).field("const",Boolean,s.false).field("declare",Boolean,s.false).field("members",[n("TSEnumMember")]).field("initializer",i(n("Expression"),null),s.null),n("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",n("Identifier")).field("declare",Boolean,s.false).field("typeAnnotation",n("TSType")),n("TSModuleBlock").bases("Node").build("body").field("body",[n("Statement")]),n("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",i(o,a)).field("declare",Boolean,s.false).field("global",Boolean,s.false).field("body",i(n("TSModuleBlock"),n("TSModuleDeclaration"),null),s.null),n("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",o).field("qualifier",i(a,void 0),s.undefined),n("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",n("Identifier")).field("isExport",Boolean,s.false).field("moduleReference",i(a,n("TSExternalModuleReference"))),n("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",o),n("TSExportAssignment").bases("Statement").build("expression").field("expression",n("Expression")),n("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",n("Identifier")),n("TSInterfaceBody").bases("Node").build("body").field("body",[u]),n("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",a),n("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",a).field("declare",Boolean,s.false).field("extends",i([n("TSExpressionWithTypeArguments")],null),s.null).field("body",n("TSInterfaceBody")),n("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",i("public","private","protected",void 0),s.undefined).field("readonly",Boolean,s.false).field("parameter",i(n("Identifier"),n("AssignmentPattern"))),n("ClassProperty").field("access",i("public","private","protected",void 0),s.undefined),n("ClassAccessorProperty").bases("Declaration","TSHasOptionalTypeAnnotation"),n("ClassBody").field("body",[i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"),n("ClassPrivateProperty"),n("ClassAccessorProperty"),n("ClassMethod"),n("ClassPrivateMethod"),n("StaticBlock"),n("TSDeclareMethod"),u)])}function Uue(){return`
|
|
1117
1117
|
`}function xM(t,e,r){return t&&zM.call(t,e)?t[e]:r}function que(...t){let e={},r=t.length;for(let n=0;n<r;++n){let i=Object.keys(t[n]),s=i.length;for(let o=0;o<s;++o)e[i[o]]=!0}return e}function wt(t,e){return t.line-e.line||t.column-e.column}function ka(t){return{line:t.line,column:t.column}}function zue(t,e){if(t){if(!e)return t}else return e||null;let r=new bM(t),n=new bM(e),i=new jue({file:e.file,sourceRoot:e.sourceRoot}),s={};return n.eachMapping(function(o){let a=r.originalPositionFor({line:o.originalLine,column:o.originalColumn}),c=a.source;if(c===null)return;i.addMapping({source:c,original:ka(a),generated:{line:o.generatedLine,column:o.generatedColumn},name:o.name});let u=r.sourceContentFor(c);u&&!zM.call(s,c)&&(s[c]=u,i.setSourceContent(c,u))}),i.toJSON()}function GM(t,e){if(!t.loc)return null;let r={start:t.loc.start,end:t.loc.end};function n(i){dC(r,i.loc)}return t.declaration&&t.declaration.decorators&&Ay(t)&&t.declaration.decorators.forEach(n),wt(r.start,r.end)<0&&(r.start=ka(r.start),e.skipSpaces(r.start,!1,!0),wt(r.start,r.end)<0&&(r.end=ka(r.end),e.skipSpaces(r.end,!0,!0))),t.comments&&t.comments.forEach(n),r}function dC(t,e){t&&e&&(wt(e.start,t.start)<0&&(t.start=e.start),wt(t.end,e.end)<0&&(t.end=e.end))}function EC(t,e){let r=t.loc;if(r&&(r.start.line<1&&(r.start.line=1),r.end.line<1&&(r.end.line=1)),t.type==="File"&&(r.start=e.firstPos(),r.end=e.lastPos()),Gue(t,e),Vue(t,e),r&&t.decorators)t.decorators.forEach(function(n){dC(r,n.loc)});else if(t.declaration&&Ay(t)){t.declaration.loc=null;let n=t.declaration.decorators;n&&n.forEach(function(i){dC(r,i.loc)})}else if(dy.MethodDefinition&&dy.MethodDefinition.check(t)||dy.Property.check(t)&&(t.method||t.shorthand))t.value.loc=null,dy.FunctionExpression.check(t.value)&&(t.value.id=null);else if(t.type==="ObjectTypeProperty"){let n=t.loc,i=n&&n.end;i&&(i=ka(i),e.prevPos(i)&&e.charAt(i)===","&&(i=e.skipSpaces(i,!0,!0))&&(n.end=i))}}function Gue(t,e){if(t.type!=="ForStatement")return;function r(n){let i=n&&n.loc,s=i&&i.start,o=i&&ka(i.end);for(;s&&o&&wt(s,o)<0&&(e.prevPos(o),e.charAt(o)===";");)i.end.line=o.line,i.end.column=o.column}r(t.init),r(t.test),r(t.update)}function Vue(t,e){if(t.type==="TemplateLiteral"&&t.quasis.length!==0){if(t.loc){let r=ka(t.loc.start),n=t.quasis[0];wt(n.loc.start,r)<0&&(n.loc.start=r);let i=ka(t.loc.end),s=t.quasis[t.quasis.length-1];wt(i,s.loc.end)<0&&(s.loc.end=i)}t.expressions.forEach(function(r,n){let i=e.skipSpaces(r.loc.start,!0,!1);if(e.prevPos(i)&&e.charAt(i)==="{"&&e.prevPos(i)&&e.charAt(i)==="$"){let o=t.quasis[n];wt(i,o.loc.end)<0&&(o.loc.end=i)}let s=e.skipSpaces(r.loc.end,!1,!1);if(e.charAt(s)==="}"){let o=t.quasis[n+1];wt(o.loc.start,s)<0&&(o.loc.start=s)}})}}function Ay(t){if(t)switch(t.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function VM(t){let e=t.getParentNode();return t.getName()==="declaration"&&Ay(e)?e:null}function Bf(t,e){let r=t.trailingComma;return typeof r=="object"?!!r[e]:!!r}function _y(t){let e=t||fC;function r(n){return Hue.call(e,n)?e[n]:fC[n]}return{tabWidth:+r("tabWidth"),useTabs:!!r("useTabs"),reuseWhitespace:!!r("reuseWhitespace"),lineTerminator:r("lineTerminator"),wrapColumn:Math.max(r("wrapColumn"),0),sourceFileName:r("sourceFileName"),sourceMapName:r("sourceMapName"),sourceRoot:r("sourceRoot"),inputSourceMap:r("inputSourceMap"),parser:r("esprima")||r("parser"),range:r("range"),tolerant:r("tolerant"),quote:r("quote"),trailingComma:r("trailingComma"),arrayBracketSpacing:r("arrayBracketSpacing"),objectCurlySpacing:r("objectCurlySpacing"),arrowParensAlways:r("arrowParensAlways"),flowObjectCommas:r("flowObjectCommas"),tokens:!!r("tokens")}}function DM(t,e,r){return{line:t.line+e-1,column:t.line===1?t.column+r:t.column}}function Fa(t,e,r){return{line:t.line-e+1,column:t.line===e?t.column-r:t.column}}function Kue(t,e,r,n,i){let s=wt(n,i);if(s===0)return e;let o,a;if(s<0){o=t.skipSpaces(e)||t.lastPos(),a=r.skipSpaces(n)||r.lastPos();let c=i.line-a.line;for(o.line+=c,a.line+=c,c>0&&(o.column=0,a.column=0);wt(a,i)<0&&r.nextPos(a,!0););}else{o=t.skipSpaces(e,!0)||t.firstPos(),a=r.skipSpaces(n,!0)||r.firstPos();let c=i.line-a.line;for(o.line+=c,a.line+=c,c<0&&(o.column=t.getLineLength(o.line),a.column=r.getLineLength(a.line));wt(i,a)<0&&r.prevPos(a,!0););}return o}function HM(t,e){let r=0,n=t.length;for(let i=0;i<n;++i)switch(t.charCodeAt(i)){case 9:{let s=Math.ceil(r/e)*e;s===r?r+=e:r=s;break}case 11:case 12:case 13:case 65279:break;case 32:default:r+=1;break}return r}function ee(t,e){if(t instanceof Zl)return t;t+="";let r=e&&e.tabWidth,n=t.indexOf(" ")<0,i=!e&&n&&t.length<=Yue;if(i&&hC.call(yy,t))return yy[t];let s=new Zl(t.split(gC).map(function(o){let a=Xue.exec(o)[0];return{line:o,indent:HM(a,r),locked:!1,sliceStart:a.length,sliceEnd:o.length}}),_y(e).sourceFileName);return i&&(yy[t]=s),s}function Jl(t){return!/\S/.test(t)}function Yl(t,e,r){let n=t.sliceStart,i=t.sliceEnd,s=Math.max(t.indent,0),o=s+i-n;return typeof r>"u"&&(r=o),e=Math.max(e,0),r=Math.min(r,o),r=Math.max(r,e),r<s?(s=r,i=n):i-=o-r,o=r,o-=e,e<s?s-=e:(e-=s,s=0,n+=e),t.indent===s&&t.sliceStart===n&&t.sliceEnd===i?t:{line:t.line,indent:s,locked:!1,sliceStart:n,sliceEnd:i}}function V(t){return qc.join(t)}function WM(t,e,r){if(!t)return r;if(EC(t,e),r){if(ep.Node.check(t)&&ep.SourceLocation.check(t.loc)){let i=r.length-1;for(;i>=0;--i){let s=r[i];if(s&&s.loc&&wt(s.loc.end,t.loc.start)<=0)break}return r.splice(i+1,0,t),r}}else{let i=EM.get(t);if(i)return i}let n;if(KM.check(t))n=Object.keys(t);else if(Que.check(t))n=Bue(t);else return r;r||EM.set(t,r=[]);for(let i=0,s=n.length;i<s;++i)WM(t[n[i]],e,r);return r}function JM(t,e,r){let n=WM(t,r),i=0,s=n&&n.length,o,a;for(;typeof s=="number"&&i<s;){let c=i+s>>1,u=n[c];if(wt(u.loc.start,e.loc.start)<=0&&wt(e.loc.end,u.loc.end)<=0){JM(e.enclosingNode=u,e,r);return}if(wt(u.loc.end,e.loc.start)<=0){o=u,i=c+1;continue}if(wt(e.loc.end,u.loc.start)<=0){a=u,s=c;continue}throw new Error("Comment location overlaps with node location")}o&&(e.precedingNode=o),a&&(e.followingNode=a)}function Zue(t,e,r){if(!KM.check(t))return;let n=[];t.forEach(function(i){i.loc.lines=r,JM(e,i,r);let s=i.precedingNode,o=i.enclosingNode,a=i.followingNode;if(s&&a){let c=n.length;c>0&&n[c-1].followingNode!==i.followingNode&&Ff(n,r),n.push(i)}else if(s)Ff(n,r),XM(s,i);else if(a)Ff(n,r),YM(a,i);else if(o)Ff(n,r),ele(o,i);else throw new Error("AST contains no nodes at all?")}),Ff(n,r),t.forEach(function(i){delete i.precedingNode,delete i.enclosingNode,delete i.followingNode})}function Ff(t,e){let r=t.length;if(r===0)return;let n=t[0].precedingNode,i=t[0].followingNode,s=i.loc.start,o=r,a;for(;o>0;--o){a=t[o-1];let c=e.sliceString(a.loc.end,s);if(/\S/.test(c))break;s=a.loc.start}for(;o<=r&&(a=t[o])&&(a.type==="Line"||a.type==="CommentLine")&&a.loc.start.column>i.loc.start.column;)++o;if(o){let{enclosingNode:c}=t[o-1];c?.type==="CallExpression"&&--o}t.forEach(function(c,u){u<o?XM(n,c):YM(i,c)}),t.length=0}function CC(t,e){(t.comments||(t.comments=[])).push(e)}function YM(t,e){e.leading=!0,e.trailing=!1,CC(t,e)}function ele(t,e){e.leading=!1,e.trailing=!1,CC(t,e)}function XM(t,e){e.leading=!1,e.trailing=!0,CC(t,e)}function tle(t,e){let r=t.getValue();ep.Comment.assert(r);let n=r.loc,i=n&&n.lines,s=[e(t)];if(r.trailing)s.push(`
|
|
1118
1118
|
`);else if(i instanceof Zl){let o=i.slice(n.end,i.skipSpaces(n.end)||i.lastPos());o.length===1?s.push(o):s.push(new Array(o.length).join(`
|
|
1119
1119
|
`))}else s.push(`
|
|
1120
1120
|
`);return V(s)}function rle(t,e){let r=t.getValue(t);ep.Comment.assert(r);let n=r.loc,i=n&&n.lines,s=[];if(i instanceof Zl){let o=i.skipSpaces(n.start,!0)||i.firstPos(),a=i.slice(o,n.start);a.length===1?s.push(a):s.push(new Array(a.length).join(`
|
|
1121
|
-
`))}return s.push(e(t)),V(s)}function CM(t,e){let r=t.getValue(),n=e(t),i=ep.Node.check(r)&&Ko(r,"comments");if(!i||i.length===0)return n;let s=[],o=[n];return t.each(function(a){let c=a.getValue(),u=Ko(c,"leading"),l=Ko(c,"trailing");u||l&&!(ep.Statement.check(r)||c.type==="Block"||c.type==="CommentBlock")?s.push(tle(a,e)):l&&o.push(rle(a,e))},"comments"),s.push.apply(s,o),V(s)}function QM(t,e){e=_y(e);let r=ee(t,e),n=r.toString({tabWidth:e.tabWidth,reuseWhitespace:!1,useTabs:!1}),i=[],s=e.parser.parse(n,{jsx:!0,loc:!0,locations:!0,range:e.range,comment:!0,onComment:i,tolerant:xM(e,"tolerant",!0),ecmaVersion:6,sourceType:xM(e,"sourceType","module")}),o=Array.isArray(s.tokens)?s.tokens:!1;delete s.tokens,o.forEach(function(l){typeof l.value!="string"&&(l.value=r.sliceString(l.loc.start,l.loc.end))}),Array.isArray(s.comments)&&(i=s.comments,delete s.comments),s.loc?EC(s,r):s.loc={start:r.firstPos(),end:r.lastPos()},s.loc.lines=r,s.loc.indent=0;let a,c;s.type==="Program"?(c=s,a=nle.file(s,e.sourceFileName||null),a.loc={start:r.firstPos(),end:r.lastPos(),lines:r,indent:0}):s.type==="File"&&(a=s,c=a.program),e.tokens&&(a.tokens=o);let u=GM({type:c.type,loc:c.loc,body:[],comments:i},r);return c.loc.start=u.start,c.loc.end=u.end,Zue(i,c.body.length?a.program:a,r),new ZM(r,o).copy(a)}function
|
|
1121
|
+
`))}return s.push(e(t)),V(s)}function CM(t,e){let r=t.getValue(),n=e(t),i=ep.Node.check(r)&&Ko(r,"comments");if(!i||i.length===0)return n;let s=[],o=[n];return t.each(function(a){let c=a.getValue(),u=Ko(c,"leading"),l=Ko(c,"trailing");u||l&&!(ep.Statement.check(r)||c.type==="Block"||c.type==="CommentBlock")?s.push(tle(a,e)):l&&o.push(rle(a,e))},"comments"),s.push.apply(s,o),V(s)}function QM(t,e){e=_y(e);let r=ee(t,e),n=r.toString({tabWidth:e.tabWidth,reuseWhitespace:!1,useTabs:!1}),i=[],s=e.parser.parse(n,{jsx:!0,loc:!0,locations:!0,range:e.range,comment:!0,onComment:i,tolerant:xM(e,"tolerant",!0),ecmaVersion:6,sourceType:xM(e,"sourceType","module")}),o=Array.isArray(s.tokens)?s.tokens:!1;delete s.tokens,o.forEach(function(l){typeof l.value!="string"&&(l.value=r.sliceString(l.loc.start,l.loc.end))}),Array.isArray(s.comments)&&(i=s.comments,delete s.comments),s.loc?EC(s,r):s.loc={start:r.firstPos(),end:r.lastPos()},s.loc.lines=r,s.loc.indent=0;let a,c;s.type==="Program"?(c=s,a=nle.file(s,e.sourceFileName||null),a.loc={start:r.firstPos(),end:r.lastPos(),lines:r,indent:0}):s.type==="File"&&(a=s,c=a.program),e.tokens&&(a.tokens=o);let u=GM({type:c.type,loc:c.loc,body:[],comments:i},r);return c.loc.start=u.start,c.loc.end=u.end,Zue(i,c.body.length?a.program:a,r),new ZM(r,o).copy(a)}function t8(t,e){let r=t.stack;for(let n=r.length-1;n>=0;n-=2){let i=r[n];if(rr.Node.check(i)&&--e<0)return i}return null}function r8(t){return rr.BinaryExpression.check(t)||rr.LogicalExpression.check(t)}function vC(t){return rr.CallExpression.check(t)?!0:ole.check(t)?t.some(vC):rr.Node.check(t)?$ue(t,(e,r)=>vC(r)):!1}function SM(t){let e=[];return t.comments&&t.comments.length>0&&t.comments.forEach(function(r){(r.leading||r.trailing)&&e.push(r)}),e}function ple(t){let e=t.getValue();if(!Lf.check(e))return;let r=e.original,n=r&&r.loc,i=n&&n.lines,s=[];if(!(!i||!mle(t,s)))return function(o){let a=new n8(i);s.forEach(function(u){let l=u.newPath.getValue(),p=u.oldPath.getValue();ule.assert(p.loc,!0);let d=!a.tryToReprintComments(l,p,o);d&&a.deleteComments(p);let m=o(u.newPath,{includeComments:d,avoidRootParens:p.type===l.type&&u.oldPath.hasParens()}).indentTail(p.loc.indent),f=dle(i,p.loc,m),g=fle(i,p.loc,m);if(f||g){let y=[];f&&y.push(" "),y.push(m),g&&y.push(" "),m=V(y)}a.replace(p.loc,m)});let c=a.get(n).indentTail(-r.loc.indent);return t.needsParens()?V(["(",c,")"]):c}}function dle(t,e,r){let n=ka(e.start),i=t.prevPos(n)&&t.charAt(n),s=r.charAt(r.firstPos());return i&&Sy.test(i)&&s&&Sy.test(s)}function fle(t,e,r){let n=t.charAt(e.end),i=r.lastPos(),s=r.prevPos(i)&&r.charAt(i);return s&&Sy.test(s)&&n&&Sy.test(n)}function mle(t,e){let r=t.getValue();Lf.assert(r);let n=r.original;if(Lf.assert(n),r.type!==n.type)return!1;let i=new ws(n),s=xC(t,i,e);return s||(e.length=0),s}function s8(t,e,r){let n=t.getValue(),i=e.getValue();return n===i?!0:bC.check(n)?o8(t,e,r):$f.check(n)?hle(t,e,r):!1}function o8(t,e,r){let n=t.getValue(),i=e.getValue();if(n===i||t.valueIsDuplicate()||e.valueIsDuplicate())return!0;bC.assert(n);let s=n.length;if(!(bC.check(i)&&i.length===s))return!1;for(let o=0;o<s;++o){t.stack.push(o,n[o]),e.stack.push(o,i[o]);let a=s8(t,e,r);if(t.stack.length-=2,e.stack.length-=2,!a)return!1}return!0}function hle(t,e,r){let n=t.getValue();if($f.assert(n),n.original===null)return!1;let i=e.getValue();if(!$f.check(i))return!1;if(n===i||t.valueIsDuplicate()||e.valueIsDuplicate())return!0;if(Lf.check(n)){if(!Lf.check(i))return!1;let s=t.getParentNode(),o=e.getParentNode();if(o!==null&&o.type==="FunctionTypeAnnotation"&&s!==null&&s.type==="FunctionTypeAnnotation"){let a=o.params.length!==1||!!o.params[0].name,c=s.params.length!==1||!!s.params[0].name;if(!a&&c)return!1}if(n.type===i.type){let a=[];if(xC(t,e,a))r.push.apply(r,a);else if(i.loc)r.push({oldPath:e.copy(),newPath:t.copy()});else return!1;return!0}return wM.check(n)&&wM.check(i)&&i.loc?(r.push({oldPath:e.copy(),newPath:t.copy()}),!0):!1}return xC(t,e,r)}function xC(t,e,r){let n=t.getValue(),i=e.getValue();if($f.assert(n),$f.assert(i),n.original===null||t.needsParens()&&!e.hasParens())return!1;let s=que(i,n);(i.type==="File"||n.type==="File")&&delete s.tokens,delete s.loc;let o=r.length;for(let a in s){if(a.charAt(0)==="_")continue;t.stack.push(a,Ko(n,a)),e.stack.push(a,Ko(i,a));let c=s8(t,e,r);if(t.stack.length-=2,e.stack.length-=2,!c)return!1}return!(cle.check(t.getNode())&&r.length>o)}function AM(t,e,r,n){let i=t.getValue(),s=[],o=ble(t,e,n);if(!i||o.isEmpty())return o;let a=!1,c=xle(t,n);return c.isEmpty()?r.avoidRootParens||(a=t.needsParens()):s.push(c),a&&s.unshift("("),s.push(o),a&&s.push(")"),V(s)}function ble(t,e,r){let n=t.getValue();if(!n)return ee("");if(typeof n=="string")return ee(n,e);Sr.Printable.assert(n);let i=[];switch(n.type){case"File":return t.call(r,"program");case"Program":return n.directives&&t.each(function(s){i.push(r(s),`;
|
|
1122
1122
|
`)},"directives"),n.interpreter&&i.push(t.call(r,"interpreter")),i.push(t.call(s=>Xl(s,e,r),"body")),V(i);case"Noop":case"EmptyStatement":return ee("");case"ExpressionStatement":return V([t.call(r,"expression"),";"]);case"ParenthesizedExpression":return V(["(",t.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return ee(" ").join([t.call(r,"left"),n.operator,t.call(r,"right")]);case"AssignmentPattern":return V([t.call(r,"left")," = ",t.call(r,"right")]);case"MemberExpression":case"OptionalMemberExpression":{i.push(t.call(r,"object"));let s=t.call(r,"property"),o=Ko(n,"optional");return n.computed?i.push(o?"?.[":"[",s,"]"):i.push(o?"?.":".",s),V(i)}case"ChainExpression":return t.call(r,"expression");case"MetaProperty":return V([t.call(r,"meta"),".",t.call(r,"property")]);case"BindExpression":return n.object&&i.push(t.call(r,"object")),i.push("::",t.call(r,"callee")),V(i);case"Path":return ee(".").join(n.body);case"Identifier":return V([ee(n.name,e),n.optional?"?":"",t.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return V(["...",t.call(r,"argument"),t.call(r,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":return n.declare&&i.push("declare "),n.async&&i.push("async "),i.push("function"),n.generator&&i.push("*"),n.id?i.push(" ",t.call(r,"id"),t.call(r,"typeParameters")):n.typeParameters&&i.push(t.call(r,"typeParameters")),i.push("(",no(t,e,r),")",t.call(r,"returnType")),n.body&&i.push(" ",t.call(r,"body")),V(i);case"ArrowFunctionExpression":return n.async&&i.push("async "),n.typeParameters&&i.push(t.call(r,"typeParameters")),!e.arrowParensAlways&&n.params.length===1&&!n.rest&&n.params[0].type==="Identifier"&&!n.params[0].typeAnnotation&&!n.returnType?i.push(t.call(r,"params",0)):i.push("(",no(t,e,r),")",t.call(r,"returnType")),i.push(" => ",t.call(r,"body")),V(i);case"MethodDefinition":return uC(t,e,r);case"YieldExpression":return i.push("yield"),n.delegate&&i.push("*"),n.argument&&i.push(" ",t.call(r,"argument")),V(i);case"AwaitExpression":return i.push("await"),n.all&&i.push("*"),n.argument&&i.push(" ",t.call(r,"argument")),V(i);case"ModuleExpression":return V([`module {
|
|
1123
1123
|
`,t.call(r,"body").indent(e.tabWidth),`
|
|
1124
1124
|
}`]);case"ModuleDeclaration":return i.push("module",t.call(r,"id")),n.source?i.push("from",t.call(r,"source")):i.push(t.call(r,"body")),ee(" ").join(i);case"ImportSpecifier":return n.importKind&&n.importKind!=="value"&&i.push(n.importKind+" "),n.imported?(i.push(t.call(r,"imported")),n.local&&n.local.name!==n.imported.name&&i.push(" as ",t.call(r,"local"))):n.id&&(i.push(t.call(r,"id")),n.name&&i.push(" as ",t.call(r,"name"))),V(i);case"ExportSpecifier":return n.exportKind&&n.exportKind!=="value"&&i.push(n.exportKind+" "),n.local?(i.push(t.call(r,"local")),n.exported&&n.exported.name!==n.local.name&&i.push(" as ",t.call(r,"exported"))):n.id&&(i.push(t.call(r,"id")),n.name&&i.push(" as ",t.call(r,"name"))),V(i);case"ExportBatchSpecifier":return ee("*");case"ImportNamespaceSpecifier":return i.push("* as "),n.local?i.push(t.call(r,"local")):n.id&&i.push(t.call(r,"id")),V(i);case"ImportDefaultSpecifier":return n.local?t.call(r,"local"):t.call(r,"id");case"TSExportAssignment":return V(["export = ",t.call(r,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return FM(t,e,r);case"ExportAllDeclaration":return i.push("export *"),n.exported&&i.push(" as ",t.call(r,"exported")),i.push(" from ",t.call(r,"source"),";"),V(i);case"TSNamespaceExportDeclaration":return i.push("export as namespace ",t.call(r,"id")),vy(V(i));case"ExportNamespaceSpecifier":return V(["* as ",t.call(r,"exported")]);case"ExportDefaultSpecifier":return t.call(r,"exported");case"Import":return ee("import",e);case"ImportExpression":return V(["import(",t.call(r,"source"),")"]);case"ImportDeclaration":{if(i.push("import "),n.importKind&&n.importKind!=="value"&&i.push(n.importKind+" "),n.specifiers&&n.specifiers.length>0){let s=[],o=[];if(t.each(function(a){let c=a.getValue();c.type==="ImportSpecifier"?o.push(r(a)):(c.type==="ImportDefaultSpecifier"||c.type==="ImportNamespaceSpecifier")&&s.push(r(a))},"specifiers"),s.forEach((a,c)=>{c>0&&i.push(", "),i.push(a)}),o.length>0){let a=ee(", ").join(o);a.getLineLength(1)>e.wrapColumn&&(a=V([ee(`,
|
|
1125
1125
|
`).join(o).indent(e.tabWidth),","])),s.length>0&&i.push(", "),a.length>1?i.push(`{
|
|
1126
1126
|
`,a,`
|
|
1127
|
-
}`):e.objectCurlySpacing?i.push("{ ",a," }"):i.push("{",a,"}")}i.push(" from ")}return i.push(t.call(r,"source"),
|
|
1127
|
+
}`):e.objectCurlySpacing?i.push("{ ",a," }"):i.push("{",a,"}")}i.push(" from ")}return i.push(t.call(r,"source"),c8(t,e,r),";"),V(i)}case"ImportAttribute":return V([t.call(r,"key"),": ",t.call(r,"value")]);case"StaticBlock":i.push("static ");case"BlockStatement":{let s=t.call(o=>Xl(o,e,r),"body");return s.isEmpty()&&(!n.directives||n.directives.length===0)?(i.push("{}"),V(i)):(i.push(`{
|
|
1128
1128
|
`),n.directives&&t.each(function(o){i.push(vy(r(o).indent(e.tabWidth)),n.directives.length>1||!s.isEmpty()?`
|
|
1129
1129
|
`:"")},"directives"),i.push(s.indent(e.tabWidth)),i.push(`
|
|
1130
1130
|
}`),V(i))}case"ReturnStatement":{if(i.push("return"),n.argument){let s=t.call(r,"argument");s.startsWithComment()||s.length>1&&Sr.JSXElement&&Sr.JSXElement.check(n.argument)?i.push(` (
|
|
@@ -1155,7 +1155,7 @@ while`),i.push(" (",t.call(r,"test"),");"),V(i)}case"DoExpression":{let s=t.call
|
|
|
1155
1155
|
`}return r(l)},"children")).indentTail(e.tabWidth),u=t.call(r,o);return V([a,c,u])}case"JSXOpeningElement":{i.push("<",t.call(r,"name"));let s=[];t.each(function(c){s.push(" ",r(c))},"attributes");let o=V(s);return(o.length>1||o.getLineLength(1)>e.wrapColumn)&&(s.forEach(function(c,u){c===" "&&(s[u]=`
|
|
1156
1156
|
`)}),o=V(s).indentTail(e.tabWidth)),i.push(o,n.selfClosing?" />":">"),V(i)}case"JSXClosingElement":return V(["</",t.call(r,"name"),">"]);case"JSXOpeningFragment":return ee("<>");case"JSXClosingFragment":return ee("</>");case"JSXText":return ee(n.value,e);case"JSXEmptyExpression":return ee("");case"TypeAnnotatedIdentifier":return V([t.call(r,"annotation")," ",t.call(r,"identifier")]);case"ClassBody":return n.body.length===0?ee("{}"):V([`{
|
|
1157
1157
|
`,t.call(s=>Xl(s,e,r),"body").indent(e.tabWidth),`
|
|
1158
|
-
}`]);case"ClassPropertyDefinition":return i.push("static ",t.call(r,"definition")),Sr.MethodDefinition.check(n.definition)||i.push(";"),V(i);case"ClassProperty":{n.declare&&i.push("declare ");let s=n.accessibility||n.access;typeof s=="string"&&i.push(s," "),n.static&&i.push("static "),n.abstract&&i.push("abstract "),n.readonly&&i.push("readonly ");let o=t.call(r,"key");return n.computed&&(o=V(["[",o,"]"])),n.variance&&(o=V([If(t,r),o])),i.push(o),n.optional&&i.push("?"),n.definite&&i.push("!"),n.typeAnnotation&&i.push(t.call(r,"typeAnnotation")),n.value&&i.push(" = ",t.call(r,"value")),i.push(";"),V(i)}case"ClassPrivateProperty":return n.static&&i.push("static "),i.push(t.call(r,"key")),n.typeAnnotation&&i.push(t.call(r,"typeAnnotation")),n.value&&i.push(" = ",t.call(r,"value")),i.push(";"),V(i);case"ClassAccessorProperty":return i.push(...
|
|
1158
|
+
}`]);case"ClassPropertyDefinition":return i.push("static ",t.call(r,"definition")),Sr.MethodDefinition.check(n.definition)||i.push(";"),V(i);case"ClassProperty":{n.declare&&i.push("declare ");let s=n.accessibility||n.access;typeof s=="string"&&i.push(s," "),n.static&&i.push("static "),n.abstract&&i.push("abstract "),n.readonly&&i.push("readonly ");let o=t.call(r,"key");return n.computed&&(o=V(["[",o,"]"])),n.variance&&(o=V([If(t,r),o])),i.push(o),n.optional&&i.push("?"),n.definite&&i.push("!"),n.typeAnnotation&&i.push(t.call(r,"typeAnnotation")),n.value&&i.push(" = ",t.call(r,"value")),i.push(";"),V(i)}case"ClassPrivateProperty":return n.static&&i.push("static "),i.push(t.call(r,"key")),n.typeAnnotation&&i.push(t.call(r,"typeAnnotation")),n.value&&i.push(" = ",t.call(r,"value")),i.push(";"),V(i);case"ClassAccessorProperty":return i.push(...a8(n),"accessor "),n.computed?i.push("[",t.call(r,"key"),"]"):i.push(t.call(r,"key")),n.optional&&i.push("?"),n.definite&&i.push("!"),n.typeAnnotation&&i.push(t.call(r,"typeAnnotation")),n.value&&i.push(" = ",t.call(r,"value")),i.push(";"),V(i);case"ClassDeclaration":case"ClassExpression":case"DeclareClass":return n.declare&&i.push("declare "),n.abstract&&i.push("abstract "),i.push("class"),n.id&&i.push(" ",t.call(r,"id")),n.typeParameters&&i.push(t.call(r,"typeParameters")),n.superClass&&i.push(" extends ",t.call(r,"superClass"),t.call(r,"superTypeParameters")),n.extends&&n.extends.length>0&&i.push(" extends ",ee(", ").join(t.map(r,"extends"))),n.implements&&n.implements.length>0&&i.push(" implements ",ee(", ").join(t.map(r,"implements"))),i.push(" ",t.call(r,"body")),n.type==="DeclareClass"?kf(t,i):V(i);case"TemplateElement":return ee(n.value.raw,e).lockIndentTail();case"TemplateLiteral":{let s=t.map(r,"expressions");return i.push("`"),t.each(function(o){let a=o.getName();i.push(r(o)),a<s.length&&i.push("${",s[a],"}")},"quasis"),i.push("`"),V(i).lockIndentTail()}case"TaggedTemplateExpression":return V([t.call(r,"tag"),t.call(r,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"Flow":case"FlowType":case"FlowPredicate":case"MemberTypeAnnotation":case"Type":case"TSHasOptionalTypeParameterInstantiation":case"TSHasOptionalTypeParameters":case"TSHasOptionalTypeAnnotation":case"ChainElement":throw new Error("unprintable type: "+JSON.stringify(n.type));case"CommentBlock":case"Block":return V(["/*",ee(n.value,e),"*/"]);case"CommentLine":case"Line":return V(["//",ee(n.value,e)]);case"TypeAnnotation":return n.typeAnnotation?(n.typeAnnotation.type!=="FunctionTypeAnnotation"&&i.push(": "),i.push(t.call(r,"typeAnnotation")),V(i)):ee("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return ee("*",e);case"EmptyTypeAnnotation":return ee("empty",e);case"AnyTypeAnnotation":return ee("any",e);case"MixedTypeAnnotation":return ee("mixed",e);case"ArrayTypeAnnotation":return V([t.call(r,"elementType"),"[]"]);case"TupleTypeAnnotation":{let s=t.map(r,"types"),a=ee(", ").join(s).getLineLength(1)<=e.wrapColumn;return a?e.arrayBracketSpacing?i.push("[ "):i.push("["):i.push(`[
|
|
1159
1159
|
`),t.each(function(c){let u=c.getName();if(!c.getValue())i.push(",");else{let p=s[u];a?u>0&&i.push(" "):p=p.indent(e.tabWidth),i.push(p),(u<n.types.length-1||!a&&Bf(e,"arrays"))&&i.push(","),a||i.push(`
|
|
1160
1160
|
`)}},"types"),a&&e.arrayBracketSpacing?i.push(" ]"):i.push("]"),V(i)}case"BooleanTypeAnnotation":return ee("boolean",e);case"BooleanLiteralTypeAnnotation":return ee(""+n.value,e);case"InterfaceTypeAnnotation":return i.push("interface"),n.extends&&n.extends.length>0&&i.push(" extends ",ee(", ").join(t.map(r,"extends"))),i.push(" ",t.call(r,"body")),V(i);case"DeclareFunction":return kf(t,["function ",t.call(r,"id"),";"]);case"DeclareModule":return kf(t,["module ",t.call(r,"id")," ",t.call(r,"body")]);case"DeclareModuleExports":return kf(t,["module.exports",t.call(r,"typeAnnotation")]);case"DeclareVariable":return kf(t,["var ",t.call(r,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return V(["declare ",FM(t,e,r)]);case"EnumDeclaration":return V(["enum ",t.call(r,"id"),t.call(r,"body")]);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return(n.type==="EnumSymbolBody"||n.explicitType)&&i.push(" of ",n.type.slice(4,-4).toLowerCase()),i.push(` {
|
|
1161
1161
|
`,ee(`
|
|
@@ -1183,7 +1183,7 @@ while`),i.push(" (",t.call(r,"test"),");"),V(i)}case"DoExpression":{let s=t.call
|
|
|
1183
1183
|
`)}else g=p?`
|
|
1184
1184
|
|
|
1185
1185
|
`:`
|
|
1186
|
-
`;else g="";o.push(Dle(i,f),u),m?i=g:g&&o.push(g)}),V(o)}function Dle(t,e){if(!t&&!e)return ee("");if(!t)return ee(e);if(!e)return ee(t);let r=ee(t),n=ee(e);return n.length>r.length?n:r}function
|
|
1186
|
+
`;else g="";o.push(Dle(i,f),u),m?i=g:g&&o.push(g)}),V(o)}function Dle(t,e){if(!t&&!e)return ee("");if(!t)return ee(e);if(!e)return ee(t);let r=ee(t),n=ee(e);return n.length>r.length?n:r}function a8(t){let e=[];t.declare&&e.push("declare ");let r=t.accessibility||t.access;return typeof r=="string"&&e.push(r," "),t.static&&e.push("static "),t.override&&e.push("override "),t.abstract&&e.push("abstract "),t.readonly&&e.push("readonly "),e}function uC(t,e,r){let n=t.getNode(),i=n.kind,s=[],o=n.value;Sr.FunctionExpression.check(o)||(o=n),s.push(...a8(n)),o.async&&s.push("async "),o.generator&&s.push("*"),(i==="get"||i==="set")&&s.push(i," ");let a=t.call(r,"key");return n.computed&&(a=V(["[",a,"]"])),s.push(a),n.optional&&s.push("?"),n===o?(s.push(t.call(r,"typeParameters"),"(",no(t,e,r),")",t.call(r,"returnType")),n.body?s.push(" ",t.call(r,"body")):s.push(";")):(s.push(t.call(r,"value","typeParameters"),"(",t.call(c=>no(c,e,r),"value"),")",t.call(r,"value","returnType")),o.body?s.push(" ",t.call(r,"value","body")):s.push(";")),V(s)}function _M(t,e,r){let n=t.map(r,"arguments"),i=Bf(e,"parameters"),s=ee(", ").join(n);return s.getLineLength(1)>e.wrapColumn?(s=ee(`,
|
|
1187
1187
|
`).join(n),V([`(
|
|
1188
1188
|
`,s.indent(e.tabWidth),i?`,
|
|
1189
1189
|
)`:`
|
|
@@ -1191,35 +1191,35 @@ while`),i.push(" (",t.call(r,"test"),");"),V(i)}case"DoExpression":{let s=t.call
|
|
|
1191
1191
|
`).join(s),Bf(e,"parameters")&&!n.rest&&i[i.length-1].type!=="RestElement"?o=V([o,`,
|
|
1192
1192
|
`]):o=V([o,`
|
|
1193
1193
|
`]),V([`
|
|
1194
|
-
`,o.indent(e.tabWidth)])):o}function
|
|
1194
|
+
`,o.indent(e.tabWidth)])):o}function c8(t,e,r){let n=t.getValue();if(n.assertions&&n.assertions.length>0){let i=[" assert {"],s=t.map(r,"assertions"),o=ee(", ").join(s);return o.length>1||o.getLineLength(1)>e.wrapColumn?i.push(`
|
|
1195
1195
|
`,ee(`,
|
|
1196
1196
|
`).join(s).indent(e.tabWidth),`
|
|
1197
1197
|
}`):i.push(" ",o," }"),V(i)}return ee("")}function FM(t,e,r){let n=t.getValue(),i=["export "];n.exportKind&&n.exportKind==="type"&&(n.declaration||i.push("type "));let s=e.objectCurlySpacing;if(Sr.Declaration.assert(n),(n.default||n.type==="ExportDefaultDeclaration")&&i.push("default "),n.declaration)i.push(t.call(r,"declaration"));else if(n.specifiers){if(n.specifiers.length===1&&n.specifiers[0].type==="ExportBatchSpecifier")i.push("*");else if(n.specifiers.length===0)i.push("{}");else if(n.specifiers[0].type==="ExportDefaultSpecifier"){let a=[],c=[];if(t.each(function(u){u.getValue().type==="ExportDefaultSpecifier"?a.push(r(u)):c.push(r(u))},"specifiers"),a.forEach((u,l)=>{l>0&&i.push(", "),i.push(u)}),c.length>0){let u=ee(", ").join(c);u.getLineLength(1)>e.wrapColumn&&(u=V([ee(`,
|
|
1198
1198
|
`).join(c).indent(e.tabWidth),","])),a.length>0&&i.push(", "),u.length>1?i.push(`{
|
|
1199
1199
|
`,u,`
|
|
1200
|
-
}`):e.objectCurlySpacing?i.push("{ ",u," }"):i.push("{",u,"}")}}else i.push(s?"{ ":"{",ee(", ").join(t.map(r,"specifiers")),s?" }":"}");n.source&&i.push(" from ",t.call(r,"source"),
|
|
1200
|
+
}`):e.objectCurlySpacing?i.push("{ ",u," }"):i.push("{",u,"}")}}else i.push(s?"{ ":"{",ee(", ").join(t.map(r,"specifiers")),s?" }":"}");n.source&&i.push(" from ",t.call(r,"source"),c8(t,e,r))}let o=V(i);return jf(o)!==";"&&!(n.declaration&&(n.declaration.type==="FunctionDeclaration"||n.declaration.type==="ClassDeclaration"||n.declaration.type==="TSModuleDeclaration"||n.declaration.type==="TSInterfaceDeclaration"||n.declaration.type==="TSEnumDeclaration"))&&(o=V([o,";"])),o}function kf(t,e){return VM(t)||e.unshift("declare "),V(e)}function If(t,e){return t.call(function(r){let n=r.getValue();return n?n==="plus"?ee("+"):n==="minus"?ee("-"):e(r):ee("")},"variance")}function Uc(t,e){return t.length>1?V([" ",t]):V([`
|
|
1201
1201
|
`,vy(t).indent(e.tabWidth)])}function jf(t){let e=t.lastPos();do{let r=t.charAt(e);if(/\S/.test(r))return r}while(t.prevPos(e))}function kM(t){return jf(t)==="}"}function fy(t){return t.replace(/['"]/g,e=>e==='"'?"'":'"')}function Ql(t){let e=Ko(t,"value"),r=Ko(t,"extra");if(r&&typeof r.raw=="string"&&e==r.rawValue)return r.raw;if(t.type==="Literal"){let n=t.raw;if(typeof n=="string"&&e==n)return n}}function my(t){return JSON.stringify(t).replace(/[\u2028\u2029]/g,function(e){return"\\u"+e.charCodeAt(0).toString(16)})}function Nf(t,e){switch(wC.assert(t),e.quote){case"auto":{let r=my(t),n=fy(my(fy(t)));return r.length>n.length?n:r}case"single":return fy(my(fy(t)));case"double":default:return my(t)}}function vy(t){let e=jf(t);return!e||`
|
|
1202
|
-
};`.indexOf(e)<0?V([t,";"]):t}function Ele(t,e){return new vle(e).print(t)}function u3(){if(hy)return hy;let t=Cle();return hy={parse(e,r){return NM.parse(e,{...t,...r})}},hy}function Cle(){return{sourceType:"module",strictMode:!1,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic","jsx","typescript"]}}function Ple(t){return/^[$A-Z_a-z][\w$]*$/.test(t)}function Mn(t,e=new Set){if(t===void 0)return Nr.identifier("undefined");if(t===null)return Nr.literal(null);if(l3.has(typeof t))return Nr.literal(t);if(e.has(t))throw new gn("Can not serialize circular reference");if(e.add(t),t[SC])return t.$ast;if(t instanceof RegExp){let r=Nr.regExpLiteral(t.source,t.flags);return delete r.extra.raw,r}return t instanceof Set?Nr.newExpression(Nr.identifier("Set"),[Nr.arrayExpression([...t].map(r=>Mn(r,e)))]):t instanceof Date?Nr.newExpression(Nr.identifier("Date"),[Nr.literal(t.toISOString())]):t instanceof Map?Nr.newExpression(Nr.identifier("Map"),[Nr.arrayExpression([...t].map(([r,n])=>Nr.arrayExpression([Mn(r,e),Mn(n,e)])))]):Array.isArray(t)?Nr.arrayExpression(t.map(r=>Mn(r,e))):typeof t=="object"?Nr.objectExpression(Object.entries(t).map(([r,n])=>Nr.property("init",/^[$A-Z_a-z][\w$]*$/g.test(r)?Nr.identifier(r):Nr.literal(r),Mn(n,e)))):Nr.literal(t)}function Ale(t,e={}){let r=e;return r[SC]=!0,r.$ast=t,r.$type||(r.$type="object"),r}function Hi(t,e,r){let n=Ale(t,e);return new Proxy({},{ownKeys(){return Object.keys(n).filter(i=>i!==SC&&!i.startsWith("$"))},getOwnPropertyDescriptor(){return _le},has(i,s){return s in n},...r,get(i,s,o){if(s in n)return n[s];if(r.get)return r.get(i,s,o)},set(i,s,o,a){return s in n?(n[s]=o,!0):r.set?r.set(i,s,o,a):!1}})}function Fle(t,e,r){if(lC.has(e))return lC.get(e);let n=Hi(e,{get $declaration(){return t},get imported(){return e.type==="ImportDefaultSpecifier"?"default":e.type==="ImportNamespaceSpecifier"?"*":e.imported.type==="Identifier"?e.imported.name:e.imported.value},set imported(i){if(e.type!=="ImportSpecifier")throw new gn("Changing import name is not yet implemented");e.imported.type==="Identifier"?e.imported.name=i:e.imported.value=i},get local(){return e.local.name},set local(i){e.local.name=i},get from(){return t.source.value},set from(i){if(i===t.source.value)return;t.specifiers=t.specifiers.filter(o=>o!==e),t.specifiers.length===0&&(r.body=r.body.filter(o=>o!==t));let s=r.body.find(o=>o.type==="ImportDeclaration"&&o.source.value===i);s?s.specifiers.push(e):r.body.unshift(xi.importDeclaration([e],xi.stringLiteral(i)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return lC.set(e,n),n}function kle(t,e){let r=()=>{let o=[];for(let a of t.body)if(a.type==="ImportDeclaration")for(let c of a.specifiers)o.push(Fle(a,c,t));return o},n=(o,a,c)=>{let u=r(),l=u.find(f=>f.local===o),p=a.local||o;if(l)return l.imported=a.imported,l.local=p,l.from=a.from,!0;let d=a.imported==="default"?xi.importDefaultSpecifier(xi.identifier(p)):a.imported==="*"?xi.importNamespaceSpecifier(xi.identifier(p)):xi.importSpecifier(xi.identifier(a.imported),xi.identifier(p)),m=u.find(f=>f.from===a.from)?.$declaration;if(m)m.specifiers.push(d);else if(c==="prepend"||u.length===0)t.body.unshift(xi.importDeclaration([d],xi.stringLiteral(a.from)));else{let f=u.at(-1).$declaration,g=t.body.indexOf(f);t.body.splice(g+1,0,xi.importDeclaration([d],xi.stringLiteral(a.from)))}return!0},i=o=>{let a=r().find(l=>l.local===o);if(!a)return!1;let c=a.$declaration,u=a.$ast;return c.specifiers=c.specifiers.filter(l=>l!==u),c.specifiers.length===0&&(t.body=t.body.filter(l=>l!==c)),!0};return Hi(t,{$type:"imports",$add(o){n(o.local||o.imported,o,"prepend")},$prepend(o){n(o.local||o.imported,o,"prepend")},$append(o){n(o.local||o.imported,o,"append")},get $items(){return r()},toJSON(){return r().reduce((o,a)=>(o[a.local]=a,o),{})}},{get(o,a){return r().find(c=>c.local===a)},set(o,a,c){return n(a,c,"prepend")},deleteProperty(o,a){return i(a)},ownKeys(){return r().map(o=>o.local)},has(o,a){return r().some(c=>c.local===a)}})}function Fy(t,e,r){let n=s=>e[s],i=(s,o)=>{e[s]=o};return Hi(t,{$type:"array",push(s){e.push(Mn(s))},pop(){return Bn(e.pop(),r)},unshift(s){e.unshift(Mn(s))},shift(){return Bn(e.shift(),r)},splice(s,o,...a){return e.splice(s,o,...a.map(u=>Mn(u))).map(u=>Bn(u,r))},find(s){return e.map(o=>Bn(o,r)).find(s)},findIndex(s){return e.map(o=>Bn(o,r)).findIndex(s)},includes(s){return e.map(o=>Bn(o,r)).includes(s)},toJSON(){return e.map(s=>Bn(s,r))}},{get(s,o){if(o==="length")return e.length;if(o===Symbol.iterator)return function*(){for(let u of e)yield Bn(u,r)};if(typeof o=="symbol")return;let a=+o;if(Number.isNaN(a))return;let c=n(a);if(c)return Bn(c,r)},set(s,o,a){if(typeof o=="symbol")return!1;let c=+o;return Number.isNaN(c)?!1:(i(c,Mn(a)),!0)},deleteProperty(s,o){if(typeof o=="symbol")return!1;let a=+o;return Number.isNaN(a)?!1:(e[a]=Mn(void 0),!0)},ownKeys(){return["length",...e.map((s,o)=>o.toString())]}})}function Ile(t,e){if("elements"in t)return Fy(t,t.elements,e)}function p3(t,e){if(t.type!=="CallExpression")throw new gn("Not a function call");function r(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${r(i.object)}.${r(i.property)}`;throw new gn("Not implemented")}let n=Fy(t,t.arguments,e);return Hi(t,{$type:"function-call",$callee:r(t.callee),$args:n},{})}function Nle(t,e){if(t.type!=="ArrowFunctionExpression")throw new gn("Not an arrow function expression");let r=Fy(t,t.params,e);return Hi(t,{$type:"arrow-function-expression",$params:r,$body:Bn(t.body,e)},{})}function Ole(t,e){if(!("properties"in t))return;let r=s=>{for(let o of t.properties){if("key"in o&&"name"in o.key&&o.key.name===s)return o.value;if(o.type==="ObjectProperty"&&(o.key.type==="StringLiteral"||o.key.type==="NumericLiteral"||o.key.type==="BooleanLiteral")&&o.key.value.toString()===s)return o.value.value??o.value}},n=(s,o=!1)=>{if("key"in s&&"name"in s.key)return s.key.name;if(s.type==="ObjectProperty"&&(s.key.type==="StringLiteral"||s.key.type==="NumericLiteral"||s.key.type==="BooleanLiteral"))return s.key.value.toString();if(o)throw new gn(`Casting "${s.type}" is not supported`,{ast:s,code:e?.$code})},i=(s,o)=>{let a=t.properties.find(c=>n(c)===s);a?a.value=o:Ple(s)?t.properties.push({type:"Property",key:{type:"Identifier",name:s},value:o}):t.properties.push({type:"ObjectProperty",key:Rle.stringLiteral(s),value:o})};return Hi(t,{$type:"object",toJSON(){return t.properties.reduce((s,o)=>("key"in o&&"name"in o.key&&(s[o.key.name]=Bn(o.value,e)),s),{})}},{get(s,o){let a=r(o);if(a)return Bn(a,e)},set(s,o,a){return typeof o!="string"&&(o=String(o)),i(o,Mn(a)),!0},deleteProperty(s,o){typeof o!="string"&&(o=String(o));let a=t.properties.findIndex(c=>"key"in c&&"name"in c.key&&c.key.name===o);return a!==-1&&t.properties.splice(a,1),!0},ownKeys(){return t.properties.map(s=>n(s,!0)).filter(Boolean)}})}function d3(t,e){if(t.type!=="NewExpression")throw new gn("Not a new expression");function r(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${r(i.object)}.${r(i.property)}`;throw new gn("Not implemented")}let n=Fy(t,t.arguments,e);return Hi(t,{$type:"new-expression",$callee:r(t.callee),$args:n},{})}function Ble(t){if(t.type!=="Identifier")throw new gn("Not an identifier");return Hi(t,{$type:"identifier",$name:t.name},{})}function Mle(t){if(t.type!=="LogicalExpression")throw new gn("Not a logical expression");return Hi(t,{$type:"logicalExpression"},{})}function Lle(t){if(t.type!=="MemberExpression")throw new gn("Not a member expression");return Hi(t,{$type:"memberExpression"},{})}function Bn(t,e){if(l3.has(typeof t))return t;if(Tle.has(t.type))return t.value;if(pC.has(t))return pC.get(t);let r;switch(t.type){case"ObjectExpression":{r=Ole(t,e);break}case"ArrayExpression":{r=Ile(t,e);break}case"CallExpression":{r=p3(t,e);break}case"ArrowFunctionExpression":{r=Nle(t,e);break}case"NewExpression":{r=d3(t,e);break}case"Identifier":{r=Ble(t);break}case"LogicalExpression":{r=Mle(t);break}case"MemberExpression":{r=Lle(t);break}case"TSAsExpression":case"TSSatisfiesExpression":{r=Bn(t.expression,e);break}default:throw new gn(`Casting "${t.type}" is not supported`,{ast:t,code:e?.$code})}return pC.set(t,r),r}function $le(t,e){let r=i=>{let s=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o of t.body)if(o.type===s){if(i==="default")return o.declaration;if(o.declaration&&"declarations"in o.declaration){let a=o.declaration.declarations[0];if("name"in a.id&&a.id.name===i)return a.init}}},n=(i,s)=>{let o=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",a=Mn(s);for(let c of t.body)if(c.type===o){if(i==="default"){c.declaration=a;return}if(c.declaration&&"declarations"in c.declaration){let u=c.declaration.declarations[0];if("name"in u.id&&u.id.name===i){u.init=a;return}}}t.body.push(i==="default"?Rf.exportDefaultDeclaration(a):Rf.exportNamedDeclaration(Rf.variableDeclaration("const",[Rf.variableDeclarator(Rf.identifier(i),a)])))};return Hi(t,{$type:"exports"},{get(i,s){let o=r(s);if(o)return Bn(o,e)},set(i,s,o){return n(s,o),!0},ownKeys(){return t.body.flatMap(i=>i.type==="ExportDefaultDeclaration"?["default"]:i.type==="ExportNamedDeclaration"&&i.declaration&&"declarations"in i.declaration?i.declaration.declarations.map(s=>"name"in s.id?s.id.name:""):[]).filter(Boolean)},deleteProperty(i,s){let o=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a=0;a<t.body.length;a++){let c=t.body[a];if(c.type===o){if(s==="default")return t.body.splice(a,1),!0;if(c.declaration&&"declarations"in c.declaration){let u=c.declaration.declarations[0];if("name"in u.id&&u.id.name===s)return t.body.splice(a,1),!0}}}return!1}})}function jle(t,e){let r=t.program;if(r.type!=="Program")throw new gn(`Cannot proxify ${t.type} as module`);let n={$code:e,$type:"module"},i=Hi(r,n,{ownKeys(){return["imports","exports","generate"]}});return n.exports=$le(r,i),n.imports=kle(r),n.generate=s=>TC(i,s),i}function f3(t,e={}){let r={wrapColumn:e.wrapColumn===void 0,indent:e.tabWidth===void 0||e.useTabs===void 0,quote:e.quote===void 0,arrowParens:e.arrowParensAlways===void 0,trailingComma:e.trailingComma===void 0},n=2,i=0,s=0,o=0,a=0,c=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,u={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},l=(t||"").split(`
|
|
1203
|
-
`),p=!1;for(let d of l){let m=d.trim();if(m.length!==0){if(r.wrapColumn&&d.length>o&&(o=d.length),r.indent){let f=d.match(/^\s+/)?.[0]||"";f.length>0&&(f.length>0&&f.length<n&&(n=f.length),f[0]===" "?i++:f.length>0&&i--)}if(m.at(-1)===";"?s++:m.length>0&&s--,r.quote||r.arrowParens){let f=m.matchAll(c);for(let g of f)if(g.groups)for(let y in u)g.groups[y]&&u[y]++}r.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(p?a++:a--),p=m.endsWith(","))}}return{wrapColumn:o,useTabs:i>0,tabWidth:n,quote:u.singleQuote>u.doubleQuote?"single":"double",arrowParensAlways:u.singleParam>0,trailingComma:a>0||u.trailingComma>0,useSemi:s>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...e}}function
|
|
1202
|
+
};`.indexOf(e)<0?V([t,";"]):t}function Ele(t,e){return new vle(e).print(t)}function u8(){if(hy)return hy;let t=Cle();return hy={parse(e,r){return NM.parse(e,{...t,...r})}},hy}function Cle(){return{sourceType:"module",strictMode:!1,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,startLine:1,tokens:!0,plugins:["asyncGenerators","bigInt","classPrivateMethods","classPrivateProperties","classProperties","classStaticBlock","decimal","decorators-legacy","doExpressions","dynamicImport","exportDefaultFrom","exportExtensions","exportNamespaceFrom","functionBind","functionSent","importAssertions","importMeta","nullishCoalescingOperator","numericSeparator","objectRestSpread","optionalCatchBinding","optionalChaining",["pipelineOperator",{proposal:"minimal"}],["recordAndTuple",{syntaxType:"hash"}],"throwExpressions","topLevelAwait","v8intrinsic","jsx","typescript"]}}function Ple(t){return/^[$A-Z_a-z][\w$]*$/.test(t)}function Mn(t,e=new Set){if(t===void 0)return Nr.identifier("undefined");if(t===null)return Nr.literal(null);if(l8.has(typeof t))return Nr.literal(t);if(e.has(t))throw new gn("Can not serialize circular reference");if(e.add(t),t[SC])return t.$ast;if(t instanceof RegExp){let r=Nr.regExpLiteral(t.source,t.flags);return delete r.extra.raw,r}return t instanceof Set?Nr.newExpression(Nr.identifier("Set"),[Nr.arrayExpression([...t].map(r=>Mn(r,e)))]):t instanceof Date?Nr.newExpression(Nr.identifier("Date"),[Nr.literal(t.toISOString())]):t instanceof Map?Nr.newExpression(Nr.identifier("Map"),[Nr.arrayExpression([...t].map(([r,n])=>Nr.arrayExpression([Mn(r,e),Mn(n,e)])))]):Array.isArray(t)?Nr.arrayExpression(t.map(r=>Mn(r,e))):typeof t=="object"?Nr.objectExpression(Object.entries(t).map(([r,n])=>Nr.property("init",/^[$A-Z_a-z][\w$]*$/g.test(r)?Nr.identifier(r):Nr.literal(r),Mn(n,e)))):Nr.literal(t)}function Ale(t,e={}){let r=e;return r[SC]=!0,r.$ast=t,r.$type||(r.$type="object"),r}function Hi(t,e,r){let n=Ale(t,e);return new Proxy({},{ownKeys(){return Object.keys(n).filter(i=>i!==SC&&!i.startsWith("$"))},getOwnPropertyDescriptor(){return _le},has(i,s){return s in n},...r,get(i,s,o){if(s in n)return n[s];if(r.get)return r.get(i,s,o)},set(i,s,o,a){return s in n?(n[s]=o,!0):r.set?r.set(i,s,o,a):!1}})}function Fle(t,e,r){if(lC.has(e))return lC.get(e);let n=Hi(e,{get $declaration(){return t},get imported(){return e.type==="ImportDefaultSpecifier"?"default":e.type==="ImportNamespaceSpecifier"?"*":e.imported.type==="Identifier"?e.imported.name:e.imported.value},set imported(i){if(e.type!=="ImportSpecifier")throw new gn("Changing import name is not yet implemented");e.imported.type==="Identifier"?e.imported.name=i:e.imported.value=i},get local(){return e.local.name},set local(i){e.local.name=i},get from(){return t.source.value},set from(i){if(i===t.source.value)return;t.specifiers=t.specifiers.filter(o=>o!==e),t.specifiers.length===0&&(r.body=r.body.filter(o=>o!==t));let s=r.body.find(o=>o.type==="ImportDeclaration"&&o.source.value===i);s?s.specifiers.push(e):r.body.unshift(xi.importDeclaration([e],xi.stringLiteral(i)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return lC.set(e,n),n}function kle(t,e){let r=()=>{let o=[];for(let a of t.body)if(a.type==="ImportDeclaration")for(let c of a.specifiers)o.push(Fle(a,c,t));return o},n=(o,a,c)=>{let u=r(),l=u.find(f=>f.local===o),p=a.local||o;if(l)return l.imported=a.imported,l.local=p,l.from=a.from,!0;let d=a.imported==="default"?xi.importDefaultSpecifier(xi.identifier(p)):a.imported==="*"?xi.importNamespaceSpecifier(xi.identifier(p)):xi.importSpecifier(xi.identifier(a.imported),xi.identifier(p)),m=u.find(f=>f.from===a.from)?.$declaration;if(m)m.specifiers.push(d);else if(c==="prepend"||u.length===0)t.body.unshift(xi.importDeclaration([d],xi.stringLiteral(a.from)));else{let f=u.at(-1).$declaration,g=t.body.indexOf(f);t.body.splice(g+1,0,xi.importDeclaration([d],xi.stringLiteral(a.from)))}return!0},i=o=>{let a=r().find(l=>l.local===o);if(!a)return!1;let c=a.$declaration,u=a.$ast;return c.specifiers=c.specifiers.filter(l=>l!==u),c.specifiers.length===0&&(t.body=t.body.filter(l=>l!==c)),!0};return Hi(t,{$type:"imports",$add(o){n(o.local||o.imported,o,"prepend")},$prepend(o){n(o.local||o.imported,o,"prepend")},$append(o){n(o.local||o.imported,o,"append")},get $items(){return r()},toJSON(){return r().reduce((o,a)=>(o[a.local]=a,o),{})}},{get(o,a){return r().find(c=>c.local===a)},set(o,a,c){return n(a,c,"prepend")},deleteProperty(o,a){return i(a)},ownKeys(){return r().map(o=>o.local)},has(o,a){return r().some(c=>c.local===a)}})}function Fy(t,e,r){let n=s=>e[s],i=(s,o)=>{e[s]=o};return Hi(t,{$type:"array",push(s){e.push(Mn(s))},pop(){return Bn(e.pop(),r)},unshift(s){e.unshift(Mn(s))},shift(){return Bn(e.shift(),r)},splice(s,o,...a){return e.splice(s,o,...a.map(u=>Mn(u))).map(u=>Bn(u,r))},find(s){return e.map(o=>Bn(o,r)).find(s)},findIndex(s){return e.map(o=>Bn(o,r)).findIndex(s)},includes(s){return e.map(o=>Bn(o,r)).includes(s)},toJSON(){return e.map(s=>Bn(s,r))}},{get(s,o){if(o==="length")return e.length;if(o===Symbol.iterator)return function*(){for(let u of e)yield Bn(u,r)};if(typeof o=="symbol")return;let a=+o;if(Number.isNaN(a))return;let c=n(a);if(c)return Bn(c,r)},set(s,o,a){if(typeof o=="symbol")return!1;let c=+o;return Number.isNaN(c)?!1:(i(c,Mn(a)),!0)},deleteProperty(s,o){if(typeof o=="symbol")return!1;let a=+o;return Number.isNaN(a)?!1:(e[a]=Mn(void 0),!0)},ownKeys(){return["length",...e.map((s,o)=>o.toString())]}})}function Ile(t,e){if("elements"in t)return Fy(t,t.elements,e)}function p8(t,e){if(t.type!=="CallExpression")throw new gn("Not a function call");function r(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${r(i.object)}.${r(i.property)}`;throw new gn("Not implemented")}let n=Fy(t,t.arguments,e);return Hi(t,{$type:"function-call",$callee:r(t.callee),$args:n},{})}function Nle(t,e){if(t.type!=="ArrowFunctionExpression")throw new gn("Not an arrow function expression");let r=Fy(t,t.params,e);return Hi(t,{$type:"arrow-function-expression",$params:r,$body:Bn(t.body,e)},{})}function Ole(t,e){if(!("properties"in t))return;let r=s=>{for(let o of t.properties){if("key"in o&&"name"in o.key&&o.key.name===s)return o.value;if(o.type==="ObjectProperty"&&(o.key.type==="StringLiteral"||o.key.type==="NumericLiteral"||o.key.type==="BooleanLiteral")&&o.key.value.toString()===s)return o.value.value??o.value}},n=(s,o=!1)=>{if("key"in s&&"name"in s.key)return s.key.name;if(s.type==="ObjectProperty"&&(s.key.type==="StringLiteral"||s.key.type==="NumericLiteral"||s.key.type==="BooleanLiteral"))return s.key.value.toString();if(o)throw new gn(`Casting "${s.type}" is not supported`,{ast:s,code:e?.$code})},i=(s,o)=>{let a=t.properties.find(c=>n(c)===s);a?a.value=o:Ple(s)?t.properties.push({type:"Property",key:{type:"Identifier",name:s},value:o}):t.properties.push({type:"ObjectProperty",key:Rle.stringLiteral(s),value:o})};return Hi(t,{$type:"object",toJSON(){return t.properties.reduce((s,o)=>("key"in o&&"name"in o.key&&(s[o.key.name]=Bn(o.value,e)),s),{})}},{get(s,o){let a=r(o);if(a)return Bn(a,e)},set(s,o,a){return typeof o!="string"&&(o=String(o)),i(o,Mn(a)),!0},deleteProperty(s,o){typeof o!="string"&&(o=String(o));let a=t.properties.findIndex(c=>"key"in c&&"name"in c.key&&c.key.name===o);return a!==-1&&t.properties.splice(a,1),!0},ownKeys(){return t.properties.map(s=>n(s,!0)).filter(Boolean)}})}function d8(t,e){if(t.type!=="NewExpression")throw new gn("Not a new expression");function r(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${r(i.object)}.${r(i.property)}`;throw new gn("Not implemented")}let n=Fy(t,t.arguments,e);return Hi(t,{$type:"new-expression",$callee:r(t.callee),$args:n},{})}function Ble(t){if(t.type!=="Identifier")throw new gn("Not an identifier");return Hi(t,{$type:"identifier",$name:t.name},{})}function Mle(t){if(t.type!=="LogicalExpression")throw new gn("Not a logical expression");return Hi(t,{$type:"logicalExpression"},{})}function Lle(t){if(t.type!=="MemberExpression")throw new gn("Not a member expression");return Hi(t,{$type:"memberExpression"},{})}function Bn(t,e){if(l8.has(typeof t))return t;if(Tle.has(t.type))return t.value;if(pC.has(t))return pC.get(t);let r;switch(t.type){case"ObjectExpression":{r=Ole(t,e);break}case"ArrayExpression":{r=Ile(t,e);break}case"CallExpression":{r=p8(t,e);break}case"ArrowFunctionExpression":{r=Nle(t,e);break}case"NewExpression":{r=d8(t,e);break}case"Identifier":{r=Ble(t);break}case"LogicalExpression":{r=Mle(t);break}case"MemberExpression":{r=Lle(t);break}case"TSAsExpression":case"TSSatisfiesExpression":{r=Bn(t.expression,e);break}default:throw new gn(`Casting "${t.type}" is not supported`,{ast:t,code:e?.$code})}return pC.set(t,r),r}function $le(t,e){let r=i=>{let s=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o of t.body)if(o.type===s){if(i==="default")return o.declaration;if(o.declaration&&"declarations"in o.declaration){let a=o.declaration.declarations[0];if("name"in a.id&&a.id.name===i)return a.init}}},n=(i,s)=>{let o=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",a=Mn(s);for(let c of t.body)if(c.type===o){if(i==="default"){c.declaration=a;return}if(c.declaration&&"declarations"in c.declaration){let u=c.declaration.declarations[0];if("name"in u.id&&u.id.name===i){u.init=a;return}}}t.body.push(i==="default"?Rf.exportDefaultDeclaration(a):Rf.exportNamedDeclaration(Rf.variableDeclaration("const",[Rf.variableDeclarator(Rf.identifier(i),a)])))};return Hi(t,{$type:"exports"},{get(i,s){let o=r(s);if(o)return Bn(o,e)},set(i,s,o){return n(s,o),!0},ownKeys(){return t.body.flatMap(i=>i.type==="ExportDefaultDeclaration"?["default"]:i.type==="ExportNamedDeclaration"&&i.declaration&&"declarations"in i.declaration?i.declaration.declarations.map(s=>"name"in s.id?s.id.name:""):[]).filter(Boolean)},deleteProperty(i,s){let o=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a=0;a<t.body.length;a++){let c=t.body[a];if(c.type===o){if(s==="default")return t.body.splice(a,1),!0;if(c.declaration&&"declarations"in c.declaration){let u=c.declaration.declarations[0];if("name"in u.id&&u.id.name===s)return t.body.splice(a,1),!0}}}return!1}})}function jle(t,e){let r=t.program;if(r.type!=="Program")throw new gn(`Cannot proxify ${t.type} as module`);let n={$code:e,$type:"module"},i=Hi(r,n,{ownKeys(){return["imports","exports","generate"]}});return n.exports=$le(r,i),n.imports=kle(r),n.generate=s=>TC(i,s),i}function f8(t,e={}){let r={wrapColumn:e.wrapColumn===void 0,indent:e.tabWidth===void 0||e.useTabs===void 0,quote:e.quote===void 0,arrowParens:e.arrowParensAlways===void 0,trailingComma:e.trailingComma===void 0},n=2,i=0,s=0,o=0,a=0,c=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,u={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},l=(t||"").split(`
|
|
1203
|
+
`),p=!1;for(let d of l){let m=d.trim();if(m.length!==0){if(r.wrapColumn&&d.length>o&&(o=d.length),r.indent){let f=d.match(/^\s+/)?.[0]||"";f.length>0&&(f.length>0&&f.length<n&&(n=f.length),f[0]===" "?i++:f.length>0&&i--)}if(m.at(-1)===";"?s++:m.length>0&&s--,r.quote||r.arrowParens){let f=m.matchAll(c);for(let g of f)if(g.groups)for(let y in u)g.groups[y]&&u[y]++}r.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(p?a++:a--),p=m.endsWith(","))}}return{wrapColumn:o,useTabs:i>0,tabWidth:n,quote:u.singleQuote>u.doubleQuote?"single":"double",arrowParensAlways:u.singleParam>0,trailingComma:a>0||u.trailingComma>0,useSemi:s>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...e}}function m8(t,e){let r=QM(t,{parser:e?.parser||u8(),...e});return jle(r,t)}function h8(t,e){let r=QM("("+t+")",{parser:e?.parser||u8(),...e}),n=r.program.body[0];n.type==="ExpressionStatement"&&(n=n.expression),n.extra?.parenthesized&&(n.extra.parenthesized=!1);let i={$ast:r,$code:" "+t+" ",$type:"module"};return Bn(n,i)}function TC(t,e={}){let r=t.$ast||t,n=e.format===!1||!("$code"in t)?{}:f8(t.$code,e.format),{code:i,map:s}=Ele(r,{...e,...n});return{code:i,map:s}}async function Ule(t,e={}){let r=await by.promises.readFile(t,"utf8");return e.sourceFileName=e.sourceFileName??t,m8(r,e)}async function qle(t,e,r){let n="$ast"in t?t.$ast:t,{code:i,map:s}=TC(n,r);await by.promises.writeFile(e,i),s&&await by.promises.writeFile(e+".map",s)}var by,Py,NM,mue,hue,On,RM,xy,Vi,Gc,Mf,Dy,Ey,Cy,zc,Of,wy,gue,ly,Wl,py,Ss,aqe,tp,Ts,cqe,uqe,lqe,pqe,Bue,Ko,dqe,Mue,Lue,fqe,mqe,$ue,hqe,gqe,yqe,dy,bM,jue,zM,fC,Hue,mC,Wue,Jue,_f,Zl,yy,hC,Yue,Xue,gC,qc,ep,KM,Que,EM,nle,ile,sle,ZM,e8,rr,ole,ale,yC,ws,yn,Lf,wM,cle,ule,$f,bC,lle,Sy,n8,i8,Sr,wC,gle,Ty,yle,TM,PM,vle,hy,wle,Sle,IM,gn,Tle,l8,Nr,SC,_le,xi,lC,Rle,pC,Rf,gy,zle,g8=N(()=>{h();by=require("node:fs"),Py=J(UB(),1),NM=J(vM(),1);mue=Object.defineProperty,hue=(t,e,r)=>e in t?mue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,On=(t,e,r)=>(hue(t,typeof e!="symbol"?e+"":e,r),r),RM=Object.prototype,xy=RM.toString,Vi=RM.hasOwnProperty,Gc=class{assert(e,r){if(!this.check(e,r)){var n=DC(e);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let e=this;return new Mf(e)}},Mf=class extends Gc{constructor(e){super(),this.elemType=e,On(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(e,r){return Array.isArray(e)&&e.every(n=>this.elemType.check(n,r))}},Dy=class extends Gc{constructor(e){super(),this.value=e,On(this,"kind","IdentityType")}toString(){return String(this.value)}check(e,r){let n=e===this.value;return!n&&typeof r=="function"&&r(this,e),n}},Ey=class extends Gc{constructor(e){super(),this.fields=e,On(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(e,r){return xy.call(e)===xy.call({})&&this.fields.every(n=>n.type.check(e[n.name],r))}},Cy=class extends Gc{constructor(e){super(),this.types=e,On(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(e,r){return this.types.some(n=>n.check(e,!!r))?!0:(typeof r=="function"&&r(this,e),!1)}},zc=class extends Gc{constructor(e,r){super(),this.name=e,this.predicate=r,On(this,"kind","PredicateType")}toString(){return this.name}check(e,r){let n=this.predicate(e,r);return!n&&typeof r=="function"&&r(this,e),n}},Of=class t{constructor(e,r){this.type=e,this.typeName=r,On(this,"baseNames",[]),On(this,"ownFields",Object.create(null)),On(this,"allSupertypes",Object.create(null)),On(this,"supertypeList",[]),On(this,"allFields",Object.create(null)),On(this,"fieldNames",[]),On(this,"finalized",!1),On(this,"buildable",!1),On(this,"buildParams",[])}isSupertypeOf(e){if(e instanceof t){if(this.finalized!==!0||e.finalized!==!0)throw new Error("");return Vi.call(e.allSupertypes,this.typeName)}else throw new Error(e+" is not a Def")}checkAllFields(e,r){var n=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);function i(s){var o=n[s],a=o.type,c=o.getValue(e);return a.check(c,r)}return e!==null&&typeof e=="object"&&Object.keys(n).every(i)}bases(...e){var r=this.baseNames;if(this.finalized){if(e.length!==r.length)throw new Error("");for(var n=0;n<e.length;n++)if(e[n]!==r[n])throw new Error("");return this}return e.forEach(i=>{r.indexOf(i)<0&&r.push(i)}),this}},wy=class{constructor(e,r,n,i){this.name=e,this.type=r,this.defaultFn=n,On(this,"hidden"),this.hidden=!!i}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(e){var r=e[this.name];return typeof r<"u"||typeof this.defaultFn=="function"&&(r=this.defaultFn.call(e)),r}};Ut(()=>module);gue=Object.prototype,ly=gue.hasOwnProperty;Ut(()=>module);Wl=Object.prototype.hasOwnProperty;Ut(()=>module);Ut(()=>module);py=Object.prototype.hasOwnProperty;Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ut(()=>module);Ss||(Ss={});({astNodesAreEquivalent:aqe,builders:tp,builtInTypes:Ts,defineMethod:cqe,eachField:uqe,finalize:lqe,getBuilderName:pqe,getFieldNames:Bue,getFieldValue:Ko,getSupertypeNames:dqe,namedTypes:Mue,NodePath:Lue,Path:fqe,PathVisitor:mqe,someField:$ue,Type:hqe,use:gqe,visit:yqe}=xue([Uf,Iue,UM,Nue,Rue,Oue]));Object.assign(Ss,Mue);dy=Ss,bM=Py.default.SourceMapConsumer,jue=Py.default.SourceMapGenerator,zM=Object.prototype.hasOwnProperty;fC={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:Uue(),wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},Hue=fC.hasOwnProperty;mC=class t{constructor(e,r,n=r){this.sourceLines=e,this.sourceLoc=r,this.targetLoc=n}slice(e,r,n=e.lastPos()){let i=this.sourceLines,s=this.sourceLoc,o=this.targetLoc;function a(c){let u=s[c],l=o[c],p=r;return c==="end"&&(p=n),Kue(i,u,e,l,p)}if(wt(r,o.start)<=0)if(wt(o.end,n)<=0)o={start:Fa(o.start,r.line,r.column),end:Fa(o.end,r.line,r.column)};else{if(wt(n,o.start)<=0)return null;s={start:s.start,end:a("end")},o={start:Fa(o.start,r.line,r.column),end:Fa(n,r.line,r.column)}}else{if(wt(o.end,r)<=0)return null;wt(o.end,n)<=0?(s={start:a("start"),end:s.end},o={start:{line:1,column:0},end:Fa(o.end,r.line,r.column)}):(s={start:a("start"),end:a("end")},o={start:{line:1,column:0},end:Fa(n,r.line,r.column)})}return new t(this.sourceLines,s,o)}add(e,r){return new t(this.sourceLines,this.sourceLoc,{start:DM(this.targetLoc.start,e,r),end:DM(this.targetLoc.end,e,r)})}subtract(e,r){return new t(this.sourceLines,this.sourceLoc,{start:Fa(this.targetLoc.start,e,r),end:Fa(this.targetLoc.end,e,r)})}indent(e,r=!1,n=!1){if(e===0)return this;let i=this.targetLoc,s=i.start.line,o=i.end.line;if(r&&s===1&&o===1)return this;if(i={start:i.start,end:i.end},!r||s>1){let a=i.start.column+e;i.start={line:s,column:n?Math.max(0,a):a}}if(!r||o>1){let a=i.end.column+e;i.end={line:o,column:n?Math.max(0,a):a}}return new t(this.sourceLines,this.sourceLoc,i)}};Wue=Object.defineProperty,Jue=(t,e,r)=>e in t?Wue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_f=(t,e,r)=>(Jue(t,typeof e!="symbol"?e+"":e,r),r),Zl=class t{constructor(e,r=null){this.infos=e,_f(this,"length"),_f(this,"name"),_f(this,"mappings",[]),_f(this,"cachedSourceMap",null),_f(this,"cachedTabWidth"),this.length=e.length,this.name=r||null,this.name&&this.mappings.push(new mC(this,{start:this.firstPos(),end:this.lastPos()}))}toString(e){return this.sliceString(this.firstPos(),this.lastPos(),e)}getSourceMap(e,r){if(!e)return null;let n=this;function i(a){return a=a||{},a.file=e,r&&(a.sourceRoot=r),a}if(n.cachedSourceMap)return i(n.cachedSourceMap.toJSON());let s=new Py.default.SourceMapGenerator(i()),o={};return n.mappings.forEach(function(a){let c=a.sourceLines.skipSpaces(a.sourceLoc.start)||a.sourceLines.lastPos(),u=n.skipSpaces(a.targetLoc.start)||n.lastPos();for(;wt(c,a.sourceLoc.end)<0&&wt(u,a.targetLoc.end)<0;){a.sourceLines.charAt(c),n.charAt(u);let l=a.sourceLines.name;if(s.addMapping({source:l,original:{line:c.line,column:c.column},generated:{line:u.line,column:u.column}}),!hC.call(o,l)){let p=a.sourceLines.toString();s.setSourceContent(l,p),o[l]=p}n.nextPos(u,!0),a.sourceLines.nextPos(c,!0)}}),n.cachedSourceMap=s,s.toJSON()}bootstrapCharAt(e){let r=e.line,n=e.column,i=this.toString().split(gC),s=i[r-1];return typeof s>"u"?"":n===s.length&&r<i.length?`
|
|
1204
1204
|
`:n>=s.length?"":s.charAt(n)}charAt(e){let r=e.line,n=e.column,i=this,s=i.infos,o=s[r-1],a=n;if(typeof o>"u"||a<0)return"";let c=this.getIndentAt(r);return a<c?" ":(a+=o.sliceStart-c,a===o.sliceEnd&&r<this.length?`
|
|
1205
1205
|
`:a>=o.sliceEnd?"":o.line.charAt(a))}stripMargin(e,r){if(e===0)return this;if(r&&this.length===1)return this;let n=new t(this.infos.map(function(i,s){return i.line&&(s>0||!r)&&(i={...i,indent:Math.max(0,i.indent-e)}),i}));if(this.mappings.length>0){let i=n.mappings;this.mappings.forEach(function(s){i.push(s.indent(e,r,!0))})}return n}indent(e){if(e===0)return this;let r=new t(this.infos.map(function(n){return n.line&&!n.locked&&(n={...n,indent:n.indent+e}),n}));if(this.mappings.length>0){let n=r.mappings;this.mappings.forEach(function(i){n.push(i.indent(e))})}return r}indentTail(e){if(e===0)return this;if(this.length<2)return this;let r=new t(this.infos.map(function(n,i){return i>0&&n.line&&!n.locked&&(n={...n,indent:n.indent+e}),n}));if(this.mappings.length>0){let n=r.mappings;this.mappings.forEach(function(i){n.push(i.indent(e,!0))})}return r}lockIndentTail(){return this.length<2?this:new t(this.infos.map((e,r)=>({...e,locked:r>0})))}getIndentAt(e){return Math.max(this.infos[e-1].indent,0)}guessTabWidth(){if(typeof this.cachedTabWidth=="number")return this.cachedTabWidth;let e=[],r=0;for(let s=1,o=this.length;s<=o;++s){let a=this.infos[s-1],c=a.line.slice(a.sliceStart,a.sliceEnd);if(Jl(c))continue;let u=Math.abs(a.indent-r);e[u]=~~e[u]+1,r=a.indent}let n=-1,i=2;for(let s=1;s<e.length;s+=1)hC.call(e,s)&&e[s]>n&&(n=e[s],i=s);return this.cachedTabWidth=i}startsWithComment(){if(this.infos.length===0)return!1;let e=this.infos[0],r=e.sliceStart,n=e.sliceEnd,i=e.line.slice(r,n).trim();return i.length===0||i.slice(0,2)==="//"||i.slice(0,2)==="/*"}isOnlyWhitespace(){return Jl(this.toString())}isPrecededOnlyByWhitespace(e){let r=this.infos[e.line-1],n=Math.max(r.indent,0),i=e.column-n;if(i<=0)return!0;let s=r.sliceStart,o=Math.min(s+i,r.sliceEnd),a=r.line.slice(s,o);return Jl(a)}getLineLength(e){let r=this.infos[e-1];return this.getIndentAt(e)+r.sliceEnd-r.sliceStart}nextPos(e,r=!1){let n=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(n)?(e.column+=1,r?!!this.skipSpaces(e,!1,!0):!0):n<this.length?(e.line+=1,e.column=0,r?!!this.skipSpaces(e,!1,!0):!0):!1}prevPos(e,r=!1){let n=e.line,i=e.column;if(i<1){if(n-=1,n<1)return!1;i=this.getLineLength(n)}else i=Math.min(i-1,this.getLineLength(n));return e.line=n,e.column=i,r?!!this.skipSpaces(e,!0,!0):!0}firstPos(){return{line:1,column:0}}lastPos(){return{line:this.length,column:this.getLineLength(this.length)}}skipSpaces(e,r=!1,n=!1){if(e?e=n?e:{line:e.line,column:e.column}:r?e=this.lastPos():e=this.firstPos(),r){for(;this.prevPos(e);)if(!Jl(this.charAt(e))&&this.nextPos(e))return e;return null}else{for(;Jl(this.charAt(e));)if(!this.nextPos(e))return null;return e}}trimLeft(){let e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):qc}trimRight(){let e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):qc}trim(){let e=this.skipSpaces(this.firstPos(),!1,!0);if(e===null)return qc;let r=this.skipSpaces(this.lastPos(),!0,!0);return r===null?qc:this.slice(e,r)}eachPos(e,r=this.firstPos(),n=!1){let i=this.firstPos();if(r&&(i.line=r.line,i.column=r.column),!(n&&!this.skipSpaces(i,!1,!0)))do e.call(this,i);while(this.nextPos(i,n))}bootstrapSlice(e,r){let n=this.toString().split(gC).slice(e.line-1,r.line);return n.length>0&&(n.push(n.pop().slice(0,r.column)),n[0]=n[0].slice(e.column)),ee(n.join(`
|
|
1206
|
-
`))}slice(e,r){if(!r){if(!e)return this;r=this.lastPos()}if(!e)throw new Error("cannot slice with end but not start");let n=this.infos.slice(e.line-1,r.line);e.line===r.line?n[0]=Yl(n[0],e.column,r.column):(n[0]=Yl(n[0],e.column),n.push(Yl(n.pop(),0,r.column)));let i=new t(n);if(this.mappings.length>0){let s=i.mappings;this.mappings.forEach(function(o){let a=o.slice(this,e,r);a&&s.push(a)},this)}return i}bootstrapSliceString(e,r,n){return this.slice(e,r).toString(n)}sliceString(e=this.firstPos(),r=this.lastPos(),n){let{tabWidth:i,useTabs:s,reuseWhitespace:o,lineTerminator:a}=_y(n),c=[];for(let u=e.line;u<=r.line;++u){let l=this.infos[u-1];u===e.line?u===r.line?l=Yl(l,e.column,r.column):l=Yl(l,e.column):u===r.line&&(l=Yl(l,0,r.column));let p=Math.max(l.indent,0),d=l.line.slice(0,l.sliceStart);if(o&&Jl(d)&&HM(d,i)===p){c.push(l.line.slice(0,l.sliceEnd));continue}let m=0,f=p;s&&(m=Math.floor(p/i),f-=m*i);let g="";m>0&&(g+=new Array(m+1).join(" ")),f>0&&(g+=new Array(f+1).join(" ")),g+=l.line.slice(l.sliceStart,l.sliceEnd),c.push(g)}return c.join(a)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(e){let r=this,n=[],i=[],s;function o(u){if(u!==null){if(s){let l=u.infos[0],p=new Array(l.indent+1).join(" "),d=n.length,m=Math.max(s.indent,0)+s.sliceEnd-s.sliceStart;s.line=s.line.slice(0,s.sliceEnd)+p+l.line.slice(l.sliceStart,l.sliceEnd),s.locked=s.locked||l.locked,s.sliceEnd=s.line.length,u.mappings.length>0&&u.mappings.forEach(function(f){i.push(f.add(d,m))})}else u.mappings.length>0&&i.push.apply(i,u.mappings);u.infos.forEach(function(l,p){(!s||p>0)&&(s={...l},n.push(s))})}}function a(u,l){l>0&&o(r),o(u)}if(e.map(function(u){let l=ee(u);return l.isEmpty()?null:l}).forEach((u,l)=>{r.isEmpty()?o(u):a(u,l)}),n.length<1)return qc;let c=new t(n);return c.mappings=i,c}concat(...e){let r=[this];return r.push.apply(r,e),qc.join(r)}},yy={},hC=yy.hasOwnProperty,Yue=10;Xue=/^\s*/,gC=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;qc=ee(""),ep=Ss,KM=Ts.array,Que=Ts.object,EM=new WeakMap;nle=tp,ile=Ts.object,sle=Ts.array;ZM=function(e,r){this.lines=e,this.tokens=r,this.startTokenIndex=0,this.endTokenIndex=r.length,this.indent=0,this.seen=new Map},e3=ZM.prototype;e3.copy=function(t){if(this.seen.has(t))return this.seen.get(t);if(sle.check(t)){let u=new Array(t.length);return this.seen.set(t,u),t.forEach(function(l,p){u[p]=this.copy(l)},this),u}if(!ile.check(t))return t;EC(t,this.lines);let e=Object.create(Object.getPrototypeOf(t),{original:{value:t,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(t,e);let r=t.loc,n=this.indent,i=n,s=this.startTokenIndex,o=this.endTokenIndex;r&&((t.type==="Block"||t.type==="Line"||t.type==="CommentBlock"||t.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(r.start))&&(i=this.indent=r.start.column),r.lines=this.lines,r.tokens=this.tokens,r.indent=i,this.findTokenRange(r));let a=Object.keys(t),c=a.length;for(let u=0;u<c;++u){let l=a[u];l==="loc"||l==="tokens"&&t.type==="File"?e[l]=t[l]:e[l]=this.copy(t[l])}return this.indent=n,this.startTokenIndex=s,this.endTokenIndex=o,e};e3.findTokenRange=function(t){for(;this.startTokenIndex>0;){let e=t.tokens[this.startTokenIndex];if(wt(t.start,e.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<t.tokens.length;){let e=t.tokens[this.endTokenIndex];if(wt(e.loc.end,t.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let e=t.tokens[this.startTokenIndex];if(wt(e.loc.start,t.start)<0)++this.startTokenIndex;else break}for(t.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let e=t.tokens[this.endTokenIndex-1];if(wt(t.end,e.loc.end)<0)--this.endTokenIndex;else break}t.end.token=this.endTokenIndex};rr=Ss,ole=Ts.array,ale=Ts.number,yC={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(t,e){t.forEach(function(r){yC[r]=e})});ws=function(e){this.stack=[e]},yn=ws.prototype;ws.from=function(t){if(t instanceof ws)return t.copy();if(t instanceof Lue){let e=Object.create(ws.prototype),r=[t.value];for(let n;n=t.parentPath;t=n)r.push(t.name,n.value);return e.stack=r.reverse(),e}return new ws(t)};yn.copy=function(){let e=Object.create(ws.prototype);return e.stack=this.stack.slice(0),e};yn.getName=function(){let e=this.stack,r=e.length;return r>1?e[r-2]:null};yn.getValue=function(){let e=this.stack;return e[e.length-1]};yn.valueIsDuplicate=function(){let t=this.stack,e=t.length-1;return t.lastIndexOf(t[e],e-1)>=0};yn.getNode=function(e=0){return t3(this,~~e)};yn.getParentNode=function(e=0){return t3(this,~~e+1)};yn.getRootValue=function(){let e=this.stack;return e.length%2===0?e[1]:e[0]};yn.call=function(e){let r=this.stack,n=r.length,i=r[n-1],s=arguments.length;for(let a=1;a<s;++a){let c=arguments[a];i=i[c],r.push(c,i)}let o=e(this);return r.length=n,o};yn.each=function(e){let r=this.stack,n=r.length,i=r[n-1],s=arguments.length;for(let o=1;o<s;++o){let a=arguments[o];i=i[a],r.push(a,i)}for(let o=0;o<i.length;++o)o in i&&(r.push(o,i[o]),e(this),r.length-=2);r.length=n};yn.map=function(e){let r=this.stack,n=r.length,i=r[n-1],s=arguments.length;for(let a=1;a<s;++a){let c=arguments[a];i=i[c],r.push(c,i)}let o=new Array(i.length);for(let a=0;a<i.length;++a)a in i&&(r.push(a,i[a]),o[a]=e(this,a),r.length-=2);return r.length=n,o};yn.hasParens=function(){let t=this.getNode(),e=this.getPrevToken(t);if(!e)return!1;let r=this.getNextToken(t);return r?!!(e.value==="("&&(r.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1};yn.getPrevToken=function(t){t=t||this.getNode();let e=t&&t.loc,r=e&&e.tokens;if(r&&e.start.token>0){let n=r[e.start.token-1];if(n){let i=this.getRootValue().loc;if(wt(i.start,n.loc.start)<=0)return n}}return null};yn.getNextToken=function(t){t=t||this.getNode();let e=t&&t.loc,r=e&&e.tokens;if(r&&e.end.token<r.length){let n=r[e.end.token];if(n){let i=this.getRootValue().loc;if(wt(n.loc.end,i.end)<=0)return n}}return null};yn.needsParens=function(t){let e=this.getNode();if(e.type==="AssignmentExpression"&&e.left.type==="ObjectPattern")return!0;let r=this.getParentNode(),n=this.getName();if(this.getValue()!==e||rr.Statement.check(e)||e.type==="Identifier"||r&&r.type==="ParenthesizedExpression")return!1;if(e.extra&&e.extra.parenthesized)return!0;if(!r)return!1;if(e.type==="UnaryExpression"&&r.type==="BinaryExpression"&&n==="left"&&r.left===e&&r.operator==="**")return!0;switch(e.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return r.type==="MemberExpression"&&n==="object"&&r.object===e;case"BinaryExpression":case"LogicalExpression":switch(r.type){case"CallExpression":return n==="callee"&&r.callee===e;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return n==="object"&&r.object===e;case"BinaryExpression":case"LogicalExpression":{let i=r.operator,s=yC[i],o=e.operator,a=yC[o];if(s>a||s===a&&n==="right")return!0;break}default:return!1}break;case"SequenceExpression":switch(r.type){case"ReturnStatement":return!1;case"ForStatement":return!1;case"ExpressionStatement":return n!=="expression";default:return!0}case"OptionalIndexedAccessType":return e.optional&&r.type==="IndexedAccessType";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return r.type==="NullableTypeAnnotation";case"Literal":return r.type==="MemberExpression"&&ale.check(e.value)&&n==="object"&&r.object===e;case"NumericLiteral":return r.type==="MemberExpression"&&n==="object"&&r.object===e;case"YieldExpression":case"AwaitExpression":case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":case"NewExpression":return n==="callee"&&r.callee===e;case"ConditionalExpression":return n==="test"&&r.test===e;case"MemberExpression":return n==="object"&&r.object===e;default:return!1}case"ArrowFunctionExpression":return rr.CallExpression.check(r)&&n==="callee"&&r.callee===e||rr.MemberExpression.check(r)&&n==="object"&&r.object===e||rr.TSAsExpression&&rr.TSAsExpression.check(r)&&n==="expression"&&r.expression===e?!0:r3(r);case"ObjectExpression":if(r.type==="ArrowFunctionExpression"&&n==="body"&&r.body===e)return!0;break;case"TSAsExpression":if(r.type==="ArrowFunctionExpression"&&n==="body"&&r.body===e&&e.expression.type==="ObjectExpression")return!0;break;case"CallExpression":if(n==="declaration"&&rr.ExportDefaultDeclaration.check(r)&&rr.FunctionExpression.check(e.callee))return!0}return r.type==="NewExpression"&&n==="callee"&&r.callee===e?vC(e):!!(t!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};yn.canBeFirstInStatement=function(){let t=this.getNode();return!(rr.FunctionExpression.check(t)||rr.ObjectExpression.check(t)||rr.ClassExpression.check(t))};yn.firstInStatement=function(){let t=this.stack,e,r,n,i;for(let s=t.length-1;s>=0;s-=2)if(rr.Node.check(t[s])&&(n=e,i=r,e=t[s-1],r=t[s]),!(!r||!i)){if(rr.BlockStatement.check(r)&&e==="body"&&n===0||rr.ExpressionStatement.check(r)&&n==="expression"||rr.AssignmentExpression.check(r)&&n==="left"||rr.ArrowFunctionExpression.check(r)&&n==="body")return!0;if(!(rr.SequenceExpression.check(r)&&t[s+1]==="expressions"&&n===0)&&!(rr.CallExpression.check(r)&&n==="callee")&&!(rr.MemberExpression.check(r)&&n==="object")&&!(rr.ConditionalExpression.check(r)&&n==="test")&&!(r3(r)&&n==="left")&&!(rr.UnaryExpression.check(r)&&!r.prefix&&n==="argument"))return!1}return!0};Lf=Ss.Printable,wM=Ss.Expression,cle=Ss.ReturnStatement,ule=Ss.SourceLocation,$f=Ts.object,bC=Ts.array,lle=Ts.string,Sy=/[0-9a-z_$]/i,n3=function(e){let r=this,n=[];r.replace=function(i,s){lle.check(s)&&(s=ee(s)),n.push({lines:s,start:i.start,end:i.end})},r.get=function(i){i=i||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};let s=i.start,o=[];function a(c,u){o.push(e.slice(c,u))}return n.sort((c,u)=>wt(c.start,u.start)).forEach(function(c){wt(s,c.start)>0||(a(s,c.start),o.push(c.lines),s=c.end)}),a(s,i.end),V(o)}},i3=n3.prototype;i3.tryToReprintComments=function(t,e,r){let n=this;if(!t.comments&&!e.comments)return!0;let i=ws.from(t),s=ws.from(e);i.stack.push("comments",SM(t)),s.stack.push("comments",SM(e));let o=[],a=o3(i,s,o);return a&&o.length>0&&o.forEach(function(c){let u=c.oldPath.getValue();n.replace(u.loc,r(c.newPath).indentTail(u.loc.indent))}),a};i3.deleteComments=function(t){if(!t.comments)return;let e=this;t.comments.forEach(function(r){r.leading?e.replace({start:r.loc.start,end:t.loc.lines.skipSpaces(r.loc.end,!1,!1)},""):r.trailing&&e.replace({start:t.loc.lines.skipSpaces(r.loc.start,!0,!1),end:r.loc.end},"")})};Sr=Ss,wC=Ts.string,gle=Ts.object,Ty=function(e,r){wC.assert(e),this.code=e,r&&(gle.assert(r),this.map=r)},yle=Ty.prototype,TM=!1;yle.toString=function(){return TM||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),TM=!0),this.code};PM=new Ty(""),vle=function(e){let r=e&&e.tabWidth;e=_y(e),e.sourceFileName=null;function n(s,o){return s=Object.assign({},s,o),a=>i(a,s)}function i(s,o){if(o=o||{},o.includeComments)return CM(s,n(o,{includeComments:!1}));let a=e.tabWidth;if(!r){let l=s.getNode().loc;l&&l.lines&&l.lines.guessTabWidth&&(e.tabWidth=l.lines.guessTabWidth())}let c=ple(s),u=c?c(i):AM(s,e,o,n(o,{includeComments:!0,avoidRootParens:!1}));return e.tabWidth=a,u}this.print=function(s){if(!s)return PM;let o=i(ws.from(s),{includeComments:!0,avoidRootParens:!1});return new Ty(o.toString(e),zue(e.inputSourceMap,o.getSourceMap(e.sourceMapName,e.sourceRoot)))},this.printGenerically=function(s){if(!s)return PM;function o(l){return CM(l,p=>AM(p,e,{includeComments:!0,avoidRootParens:!1},o))}let a=ws.from(s),c=e.reuseWhitespace;e.reuseWhitespace=!1;let u=new Ty(o(a).toString(e));return e.reuseWhitespace=c,u}};wle=Object.defineProperty,Sle=(t,e,r)=>e in t?wle(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,IM=(t,e,r)=>(Sle(t,typeof e!="symbol"?e+"":e,r),r),gn=class extends Error{constructor(e,r){if(super(""),IM(this,"rawMessage"),IM(this,"options"),this.name="MagicastError",this.rawMessage=e,this.options=r,r?.ast&&r?.code&&r.ast.loc){let{line:n,column:i}=r.ast.loc.start,s=r.code.split(`
|
|
1206
|
+
`))}slice(e,r){if(!r){if(!e)return this;r=this.lastPos()}if(!e)throw new Error("cannot slice with end but not start");let n=this.infos.slice(e.line-1,r.line);e.line===r.line?n[0]=Yl(n[0],e.column,r.column):(n[0]=Yl(n[0],e.column),n.push(Yl(n.pop(),0,r.column)));let i=new t(n);if(this.mappings.length>0){let s=i.mappings;this.mappings.forEach(function(o){let a=o.slice(this,e,r);a&&s.push(a)},this)}return i}bootstrapSliceString(e,r,n){return this.slice(e,r).toString(n)}sliceString(e=this.firstPos(),r=this.lastPos(),n){let{tabWidth:i,useTabs:s,reuseWhitespace:o,lineTerminator:a}=_y(n),c=[];for(let u=e.line;u<=r.line;++u){let l=this.infos[u-1];u===e.line?u===r.line?l=Yl(l,e.column,r.column):l=Yl(l,e.column):u===r.line&&(l=Yl(l,0,r.column));let p=Math.max(l.indent,0),d=l.line.slice(0,l.sliceStart);if(o&&Jl(d)&&HM(d,i)===p){c.push(l.line.slice(0,l.sliceEnd));continue}let m=0,f=p;s&&(m=Math.floor(p/i),f-=m*i);let g="";m>0&&(g+=new Array(m+1).join(" ")),f>0&&(g+=new Array(f+1).join(" ")),g+=l.line.slice(l.sliceStart,l.sliceEnd),c.push(g)}return c.join(a)}isEmpty(){return this.length<2&&this.getLineLength(1)<1}join(e){let r=this,n=[],i=[],s;function o(u){if(u!==null){if(s){let l=u.infos[0],p=new Array(l.indent+1).join(" "),d=n.length,m=Math.max(s.indent,0)+s.sliceEnd-s.sliceStart;s.line=s.line.slice(0,s.sliceEnd)+p+l.line.slice(l.sliceStart,l.sliceEnd),s.locked=s.locked||l.locked,s.sliceEnd=s.line.length,u.mappings.length>0&&u.mappings.forEach(function(f){i.push(f.add(d,m))})}else u.mappings.length>0&&i.push.apply(i,u.mappings);u.infos.forEach(function(l,p){(!s||p>0)&&(s={...l},n.push(s))})}}function a(u,l){l>0&&o(r),o(u)}if(e.map(function(u){let l=ee(u);return l.isEmpty()?null:l}).forEach((u,l)=>{r.isEmpty()?o(u):a(u,l)}),n.length<1)return qc;let c=new t(n);return c.mappings=i,c}concat(...e){let r=[this];return r.push.apply(r,e),qc.join(r)}},yy={},hC=yy.hasOwnProperty,Yue=10;Xue=/^\s*/,gC=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;qc=ee(""),ep=Ss,KM=Ts.array,Que=Ts.object,EM=new WeakMap;nle=tp,ile=Ts.object,sle=Ts.array;ZM=function(e,r){this.lines=e,this.tokens=r,this.startTokenIndex=0,this.endTokenIndex=r.length,this.indent=0,this.seen=new Map},e8=ZM.prototype;e8.copy=function(t){if(this.seen.has(t))return this.seen.get(t);if(sle.check(t)){let u=new Array(t.length);return this.seen.set(t,u),t.forEach(function(l,p){u[p]=this.copy(l)},this),u}if(!ile.check(t))return t;EC(t,this.lines);let e=Object.create(Object.getPrototypeOf(t),{original:{value:t,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(t,e);let r=t.loc,n=this.indent,i=n,s=this.startTokenIndex,o=this.endTokenIndex;r&&((t.type==="Block"||t.type==="Line"||t.type==="CommentBlock"||t.type==="CommentLine"||this.lines.isPrecededOnlyByWhitespace(r.start))&&(i=this.indent=r.start.column),r.lines=this.lines,r.tokens=this.tokens,r.indent=i,this.findTokenRange(r));let a=Object.keys(t),c=a.length;for(let u=0;u<c;++u){let l=a[u];l==="loc"||l==="tokens"&&t.type==="File"?e[l]=t[l]:e[l]=this.copy(t[l])}return this.indent=n,this.startTokenIndex=s,this.endTokenIndex=o,e};e8.findTokenRange=function(t){for(;this.startTokenIndex>0;){let e=t.tokens[this.startTokenIndex];if(wt(t.start,e.loc.start)<0)--this.startTokenIndex;else break}for(;this.endTokenIndex<t.tokens.length;){let e=t.tokens[this.endTokenIndex];if(wt(e.loc.end,t.end)<0)++this.endTokenIndex;else break}for(;this.startTokenIndex<this.endTokenIndex;){let e=t.tokens[this.startTokenIndex];if(wt(e.loc.start,t.start)<0)++this.startTokenIndex;else break}for(t.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex;){let e=t.tokens[this.endTokenIndex-1];if(wt(t.end,e.loc.end)<0)--this.endTokenIndex;else break}t.end.token=this.endTokenIndex};rr=Ss,ole=Ts.array,ale=Ts.number,yC={};[["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach(function(t,e){t.forEach(function(r){yC[r]=e})});ws=function(e){this.stack=[e]},yn=ws.prototype;ws.from=function(t){if(t instanceof ws)return t.copy();if(t instanceof Lue){let e=Object.create(ws.prototype),r=[t.value];for(let n;n=t.parentPath;t=n)r.push(t.name,n.value);return e.stack=r.reverse(),e}return new ws(t)};yn.copy=function(){let e=Object.create(ws.prototype);return e.stack=this.stack.slice(0),e};yn.getName=function(){let e=this.stack,r=e.length;return r>1?e[r-2]:null};yn.getValue=function(){let e=this.stack;return e[e.length-1]};yn.valueIsDuplicate=function(){let t=this.stack,e=t.length-1;return t.lastIndexOf(t[e],e-1)>=0};yn.getNode=function(e=0){return t8(this,~~e)};yn.getParentNode=function(e=0){return t8(this,~~e+1)};yn.getRootValue=function(){let e=this.stack;return e.length%2===0?e[1]:e[0]};yn.call=function(e){let r=this.stack,n=r.length,i=r[n-1],s=arguments.length;for(let a=1;a<s;++a){let c=arguments[a];i=i[c],r.push(c,i)}let o=e(this);return r.length=n,o};yn.each=function(e){let r=this.stack,n=r.length,i=r[n-1],s=arguments.length;for(let o=1;o<s;++o){let a=arguments[o];i=i[a],r.push(a,i)}for(let o=0;o<i.length;++o)o in i&&(r.push(o,i[o]),e(this),r.length-=2);r.length=n};yn.map=function(e){let r=this.stack,n=r.length,i=r[n-1],s=arguments.length;for(let a=1;a<s;++a){let c=arguments[a];i=i[c],r.push(c,i)}let o=new Array(i.length);for(let a=0;a<i.length;++a)a in i&&(r.push(a,i[a]),o[a]=e(this,a),r.length-=2);return r.length=n,o};yn.hasParens=function(){let t=this.getNode(),e=this.getPrevToken(t);if(!e)return!1;let r=this.getNextToken(t);return r?!!(e.value==="("&&(r.value===")"||!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))):!1};yn.getPrevToken=function(t){t=t||this.getNode();let e=t&&t.loc,r=e&&e.tokens;if(r&&e.start.token>0){let n=r[e.start.token-1];if(n){let i=this.getRootValue().loc;if(wt(i.start,n.loc.start)<=0)return n}}return null};yn.getNextToken=function(t){t=t||this.getNode();let e=t&&t.loc,r=e&&e.tokens;if(r&&e.end.token<r.length){let n=r[e.end.token];if(n){let i=this.getRootValue().loc;if(wt(n.loc.end,i.end)<=0)return n}}return null};yn.needsParens=function(t){let e=this.getNode();if(e.type==="AssignmentExpression"&&e.left.type==="ObjectPattern")return!0;let r=this.getParentNode(),n=this.getName();if(this.getValue()!==e||rr.Statement.check(e)||e.type==="Identifier"||r&&r.type==="ParenthesizedExpression")return!1;if(e.extra&&e.extra.parenthesized)return!0;if(!r)return!1;if(e.type==="UnaryExpression"&&r.type==="BinaryExpression"&&n==="left"&&r.left===e&&r.operator==="**")return!0;switch(e.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return r.type==="MemberExpression"&&n==="object"&&r.object===e;case"BinaryExpression":case"LogicalExpression":switch(r.type){case"CallExpression":return n==="callee"&&r.callee===e;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return n==="object"&&r.object===e;case"BinaryExpression":case"LogicalExpression":{let i=r.operator,s=yC[i],o=e.operator,a=yC[o];if(s>a||s===a&&n==="right")return!0;break}default:return!1}break;case"SequenceExpression":switch(r.type){case"ReturnStatement":return!1;case"ForStatement":return!1;case"ExpressionStatement":return n!=="expression";default:return!0}case"OptionalIndexedAccessType":return e.optional&&r.type==="IndexedAccessType";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return r.type==="NullableTypeAnnotation";case"Literal":return r.type==="MemberExpression"&&ale.check(e.value)&&n==="object"&&r.object===e;case"NumericLiteral":return r.type==="MemberExpression"&&n==="object"&&r.object===e;case"YieldExpression":case"AwaitExpression":case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":case"NewExpression":return n==="callee"&&r.callee===e;case"ConditionalExpression":return n==="test"&&r.test===e;case"MemberExpression":return n==="object"&&r.object===e;default:return!1}case"ArrowFunctionExpression":return rr.CallExpression.check(r)&&n==="callee"&&r.callee===e||rr.MemberExpression.check(r)&&n==="object"&&r.object===e||rr.TSAsExpression&&rr.TSAsExpression.check(r)&&n==="expression"&&r.expression===e?!0:r8(r);case"ObjectExpression":if(r.type==="ArrowFunctionExpression"&&n==="body"&&r.body===e)return!0;break;case"TSAsExpression":if(r.type==="ArrowFunctionExpression"&&n==="body"&&r.body===e&&e.expression.type==="ObjectExpression")return!0;break;case"CallExpression":if(n==="declaration"&&rr.ExportDefaultDeclaration.check(r)&&rr.FunctionExpression.check(e.callee))return!0}return r.type==="NewExpression"&&n==="callee"&&r.callee===e?vC(e):!!(t!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};yn.canBeFirstInStatement=function(){let t=this.getNode();return!(rr.FunctionExpression.check(t)||rr.ObjectExpression.check(t)||rr.ClassExpression.check(t))};yn.firstInStatement=function(){let t=this.stack,e,r,n,i;for(let s=t.length-1;s>=0;s-=2)if(rr.Node.check(t[s])&&(n=e,i=r,e=t[s-1],r=t[s]),!(!r||!i)){if(rr.BlockStatement.check(r)&&e==="body"&&n===0||rr.ExpressionStatement.check(r)&&n==="expression"||rr.AssignmentExpression.check(r)&&n==="left"||rr.ArrowFunctionExpression.check(r)&&n==="body")return!0;if(!(rr.SequenceExpression.check(r)&&t[s+1]==="expressions"&&n===0)&&!(rr.CallExpression.check(r)&&n==="callee")&&!(rr.MemberExpression.check(r)&&n==="object")&&!(rr.ConditionalExpression.check(r)&&n==="test")&&!(r8(r)&&n==="left")&&!(rr.UnaryExpression.check(r)&&!r.prefix&&n==="argument"))return!1}return!0};Lf=Ss.Printable,wM=Ss.Expression,cle=Ss.ReturnStatement,ule=Ss.SourceLocation,$f=Ts.object,bC=Ts.array,lle=Ts.string,Sy=/[0-9a-z_$]/i,n8=function(e){let r=this,n=[];r.replace=function(i,s){lle.check(s)&&(s=ee(s)),n.push({lines:s,start:i.start,end:i.end})},r.get=function(i){i=i||{start:{line:1,column:0},end:{line:e.length,column:e.getLineLength(e.length)}};let s=i.start,o=[];function a(c,u){o.push(e.slice(c,u))}return n.sort((c,u)=>wt(c.start,u.start)).forEach(function(c){wt(s,c.start)>0||(a(s,c.start),o.push(c.lines),s=c.end)}),a(s,i.end),V(o)}},i8=n8.prototype;i8.tryToReprintComments=function(t,e,r){let n=this;if(!t.comments&&!e.comments)return!0;let i=ws.from(t),s=ws.from(e);i.stack.push("comments",SM(t)),s.stack.push("comments",SM(e));let o=[],a=o8(i,s,o);return a&&o.length>0&&o.forEach(function(c){let u=c.oldPath.getValue();n.replace(u.loc,r(c.newPath).indentTail(u.loc.indent))}),a};i8.deleteComments=function(t){if(!t.comments)return;let e=this;t.comments.forEach(function(r){r.leading?e.replace({start:r.loc.start,end:t.loc.lines.skipSpaces(r.loc.end,!1,!1)},""):r.trailing&&e.replace({start:t.loc.lines.skipSpaces(r.loc.start,!0,!1),end:r.loc.end},"")})};Sr=Ss,wC=Ts.string,gle=Ts.object,Ty=function(e,r){wC.assert(e),this.code=e,r&&(gle.assert(r),this.map=r)},yle=Ty.prototype,TM=!1;yle.toString=function(){return TM||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),TM=!0),this.code};PM=new Ty(""),vle=function(e){let r=e&&e.tabWidth;e=_y(e),e.sourceFileName=null;function n(s,o){return s=Object.assign({},s,o),a=>i(a,s)}function i(s,o){if(o=o||{},o.includeComments)return CM(s,n(o,{includeComments:!1}));let a=e.tabWidth;if(!r){let l=s.getNode().loc;l&&l.lines&&l.lines.guessTabWidth&&(e.tabWidth=l.lines.guessTabWidth())}let c=ple(s),u=c?c(i):AM(s,e,o,n(o,{includeComments:!0,avoidRootParens:!1}));return e.tabWidth=a,u}this.print=function(s){if(!s)return PM;let o=i(ws.from(s),{includeComments:!0,avoidRootParens:!1});return new Ty(o.toString(e),zue(e.inputSourceMap,o.getSourceMap(e.sourceMapName,e.sourceRoot)))},this.printGenerically=function(s){if(!s)return PM;function o(l){return CM(l,p=>AM(p,e,{includeComments:!0,avoidRootParens:!1},o))}let a=ws.from(s),c=e.reuseWhitespace;e.reuseWhitespace=!1;let u=new Ty(o(a).toString(e));return e.reuseWhitespace=c,u}};wle=Object.defineProperty,Sle=(t,e,r)=>e in t?wle(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,IM=(t,e,r)=>(Sle(t,typeof e!="symbol"?e+"":e,r),r),gn=class extends Error{constructor(e,r){if(super(""),IM(this,"rawMessage"),IM(this,"options"),this.name="MagicastError",this.rawMessage=e,this.options=r,r?.ast&&r?.code&&r.ast.loc){let{line:n,column:i}=r.ast.loc.start,s=r.code.split(`
|
|
1207
1207
|
`),o=Math.max(0,n-3),a=Math.min(s.length,n+3),c=s.slice(o,a).map((u,l)=>(u=`${(o+l+1).toString().padStart(3," ")} | ${u}`,o+l===n-1&&(u+=`
|
|
1208
1208
|
${" ".repeat(6+i)}^`),u));e+=`
|
|
1209
1209
|
|
|
1210
1210
|
${c.join(`
|
|
1211
1211
|
`)}
|
|
1212
|
-
`}this.message=e}},Tle=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),
|
|
1213
|
-
`).map(i=>i.trim()).includes("origin/main")?"main":e}catch(r){return Ia.captureException(new Error("Error getting git default branch name:",{cause:r})),e}}function Hle(t){try{return((0,Vc.spawnSync)("git",["rev-parse","--is-inside-work-tree"],{cwd:t}).stdout||"").toString().trim()==="true"}catch(e){return Ia.captureException(new Error("Error getting git commit:",{cause:e})),!1}}function Kle(t){try{return((0,Vc.spawnSync)("git",["rev-parse","HEAD"],{cwd:t}).stdout||"").toString().trim()}catch(e){return Ia.captureException(new Error("Error getting git commit:",{cause:e})),""}}function Wle(t){try{return((0,Vc.spawnSync)("git",["branch","--show-current"],{cwd:t}).stdout||"").toString().trim()}catch(e){return Ia.captureException(new Error("Error getting current branch name:",{cause:e})),""}}function kC(t){let e=ht.default.resolve("/");for(let r=0;r<20;r++){let n=ht.default.join(t,"package.json");if((0,Xt.existsSync)(n))return t;if(t===e)break;t=ht.default.dirname(t)}return null}function zf(t){let e=ht.default.resolve("/");for(let r=0;r<20;r++){if((0,Xt.existsSync)(ht.default.join(t,"builder.config.json"))||(0,Xt.existsSync)(ht.default.join(t,"fusion.config.json"))||(0,Xt.existsSync)(ht.default.join(t,"package.json"))||(0,Xt.existsSync)(ht.default.join(t,"remix.config.js"))||(0,Xt.existsSync)(ht.default.join(t,"remix.config.mjs"))||(0,Xt.existsSync)(ht.default.join(t,"remix.config.ts"))||(0,Xt.existsSync)(ht.default.join(t,"vite.config.js"))||(0,Xt.existsSync)(ht.default.join(t,"vite.config.ts"))||(0,Xt.existsSync)(ht.default.join(t,"vite.config.mjs"))||(0,Xt.existsSync)(ht.default.join(t,"next.config.js"))||(0,Xt.existsSync)(ht.default.join(t,"next.config.ts"))||(0,Xt.existsSync)(ht.default.join(t,"angular.json"))||(0,Xt.existsSync)(ht.default.join(t,"project.json"))||(0,Xt.existsSync)(ht.default.join(t,"tsconfig.json")))return t;if(t===e)break;t=ht.default.dirname(t)}return null}var Hr,
|
|
1214
|
-
`)}var At,qt,Ei=N(()=>{"use strict";h();$t();At=class extends Error{},qt=class extends At{constructor({type:e,cause:r,message:n,suggestions:i=[],hostname:s,port:o,statusCode:a,errorCode:c}){super(n,{cause:r}),this.name="NetworkError",this.type=e,this.suggestions=i,this.hostname=s,this.port=o,this.statusCode=a,this.errorCode=c}type;suggestions;hostname;port;statusCode;errorCode}});async function
|
|
1212
|
+
`}this.message=e}},Tle=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),l8=new Set(["string","number","boolean","bigint","symbol","undefined"]),Nr=tp;SC="__magicast_proxy";_le={enumerable:!0,configurable:!0};xi=tp,lC=new WeakMap;Rle=tp;pC=new WeakMap;Rf=tp;gy=tp,zle={functionCall(t,...e){let r=gy.callExpression(gy.identifier(t),e.map(n=>Mn(n)));return p8(r)},newExpression(t,...e){let r=gy.newExpression(gy.identifier(t),e.map(n=>Mn(n)));return d8(r)},literal(t){return Mn(t)},raw(t){return h8(t)}}});async function x8(t,e){let r=await(0,Hr.readdir)(t,{withFileTypes:!0}),n=[];for(let i of r){let s=ht.default.join(t,i.name);if(i.isDirectory()){if(!e.has(i.name))try{let o=await x8(s,e);n.push(...o)}catch(o){Ia.captureException(o,{tags:{errorType:"filesystem_permission",component:"readdirRecursive"},extra:{directory:s,errorCode:o.code}})}}else n.push(s)}return n}async function D8(t){let e=new Set,r=(...u)=>{if(process.env.DEBUG){let l=new Date,p=`${String(l.getMinutes()).padStart(2,"0")}:${String(l.getSeconds()).padStart(2,"0")}.${String(l.getMilliseconds()).padStart(3,"0")}`;console.debug(p,"[builder-dev-tools]",...u)}},n=async u=>{let l=(0,y8.createHash)("md5");return l.update(u),l.digest("hex")},i=ht.default.normalize(ht.default.resolve(process.cwd(),t.cwd)),s=kC(ht.default.normalize(t.cwd))??i,o=zf(ht.default.normalize(t.cwd))??s,a={...ht.default,getCwdDir:()=>i,getRepoRootDir:()=>s,getAppRootDir:()=>o,cwd:()=>process.cwd(),exists:async u=>{try{return await(0,Hr.access)(u),!0}catch{return!1}},magicast:PC,existsSync:u=>(0,Xt.existsSync)(u),readdir:async(u,l)=>{let p=await(0,Hr.readdir)(u);return l?p.map(d=>ht.default.join(u,d)):p},readdirRecursive:async(u,l)=>x8(u,new Set(l)),readdirSync:u=>(0,Xt.readdirSync)(u),readFile:async u=>{try{return await(0,Hr.readFile)(u,"utf-8")}catch(l){if(l.code==="ENOENT")return null;throw r(l,u),l}},readFileSync(u){try{return(0,Xt.readFileSync)(u,"utf-8")}catch(l){if(l.code==="ENOENT")return null;throw r(l,u),l}},readFileSyncBuffer(u){try{return new Uint8Array((0,Xt.readFileSync)(u,{encoding:null}))}catch(l){if(l.code==="ENOENT")return null;throw r(l,u),l}},spawnSync:Vc.spawnSync,stat:async u=>await(0,Hr.stat)(u),statSync:u=>(0,Xt.statSync)(u),unlinkSync:u=>{(0,Xt.unlinkSync)(u)},unlink:async u=>{await(0,Hr.unlink)(u)},writeFile:async(u,l)=>{u=ht.default.normalize(u);let p={path:u,basename:ht.default.basename(u),dirname:ht.default.dirname(u),extname:ht.default.extname(u)};await(0,Hr.mkdir)(ht.default.dirname(u),{recursive:!0}),await(0,Hr.writeFile)(u,l);for(let d of e)await d(p)},hash:n,getDeviceId:()=>n(`${(0,qf.hostname)()}:${(0,qf.homedir)()}`),formatCode:async(u,l)=>{let p=null;try{p=await AC.default.resolveConfig(u)}catch{}try{return AC.default.format(l,{...p,filepath:u})}catch{}return l},on:(u,l)=>{u==="change"&&e.add(l)},off:(u,l)=>{u==="change"&&e.delete(l)},debug:r,launchEditor:async u=>new Promise(l=>{try{let p=u.filePath;typeof u.line=="number"&&(p+=`:${u.line}`,typeof u.column=="number"&&(p+=`:${u.column}`)),(0,b8.default)(p,"code",(d,m)=>{let f=new Error(`Failed to launch editor for ${m}`);l({success:!1,message:f.message})}),setTimeout(()=>{l({success:!0})},100)}catch{l({success:!1,message:"Failed to launch editor"})}}),platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async u=>{let l=ht.default.normalize(u??t.cwd);return{hasGit:Hle(l),remoteUrl:Gle(l),defaultBranch:Vle(l),commit:Kle(l),currentBranch:Wle(l)}},getFrameworks:()=>[],ts:v8.default,Sentry:Ia,connectionTracker:null,version:Qe,sdkVersion:null,ignoreMissingConfig:t.ignoreMissingConfig,kind:null};a.connectionTracker=new uf(a);let c=await Cc(a);return a.getFrameworks=()=>c,a}function E8(){let t=(0,qf.homedir)();return ht.default.join(t,".config","builder","dev-tools.json")}function _C(t,e){return typeof t=="object"&&t!=null&&e in t}async function rp(){let t=E8();try{let e=await(0,Hr.readFile)(t,"utf-8");if(typeof e=="string")return JSON.parse(e)}catch(e){if(e.code==="ENOENT")return null}return null}async function FC(t){let e=E8();t=typeof t=="object"&&t!=null?t:{},await(0,Hr.mkdir)(ht.default.dirname(e),{recursive:!0}),await(0,Hr.writeFile)(e,JSON.stringify(t??{},null,2))}function Gle(t){try{return((0,Vc.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:t}).stdout||"").toString().trim()}catch(e){return Ia.captureException(new Error("Error getting git remote URL:",{cause:e})),""}}function Vle(t){let e="master";try{let r=(0,Vc.spawnSync)("git",["branch","-r"],{cwd:t});return r.stdout&&r.stdout.toString().trim().split(`
|
|
1213
|
+
`).map(i=>i.trim()).includes("origin/main")?"main":e}catch(r){return Ia.captureException(new Error("Error getting git default branch name:",{cause:r})),e}}function Hle(t){try{return((0,Vc.spawnSync)("git",["rev-parse","--is-inside-work-tree"],{cwd:t}).stdout||"").toString().trim()==="true"}catch(e){return Ia.captureException(new Error("Error getting git commit:",{cause:e})),!1}}function Kle(t){try{return((0,Vc.spawnSync)("git",["rev-parse","HEAD"],{cwd:t}).stdout||"").toString().trim()}catch(e){return Ia.captureException(new Error("Error getting git commit:",{cause:e})),""}}function Wle(t){try{return((0,Vc.spawnSync)("git",["branch","--show-current"],{cwd:t}).stdout||"").toString().trim()}catch(e){return Ia.captureException(new Error("Error getting current branch name:",{cause:e})),""}}function kC(t){let e=ht.default.resolve("/");for(let r=0;r<20;r++){let n=ht.default.join(t,"package.json");if((0,Xt.existsSync)(n))return t;if(t===e)break;t=ht.default.dirname(t)}return null}function zf(t){let e=ht.default.resolve("/");for(let r=0;r<20;r++){if((0,Xt.existsSync)(ht.default.join(t,"builder.config.json"))||(0,Xt.existsSync)(ht.default.join(t,"fusion.config.json"))||(0,Xt.existsSync)(ht.default.join(t,"package.json"))||(0,Xt.existsSync)(ht.default.join(t,"remix.config.js"))||(0,Xt.existsSync)(ht.default.join(t,"remix.config.mjs"))||(0,Xt.existsSync)(ht.default.join(t,"remix.config.ts"))||(0,Xt.existsSync)(ht.default.join(t,"vite.config.js"))||(0,Xt.existsSync)(ht.default.join(t,"vite.config.ts"))||(0,Xt.existsSync)(ht.default.join(t,"vite.config.mjs"))||(0,Xt.existsSync)(ht.default.join(t,"next.config.js"))||(0,Xt.existsSync)(ht.default.join(t,"next.config.ts"))||(0,Xt.existsSync)(ht.default.join(t,"angular.json"))||(0,Xt.existsSync)(ht.default.join(t,"project.json"))||(0,Xt.existsSync)(ht.default.join(t,"tsconfig.json")))return t;if(t===e)break;t=ht.default.dirname(t)}return null}var Hr,y8,Xt,qf,ht,v8,b8,Vc,Ia,AC,Gf=N(()=>{"use strict";h();KD();Hr=require("node:fs/promises"),y8=require("node:crypto"),Xt=require("node:fs"),qf=require("node:os"),ht=J(require("node:path"),1),v8=J(require("typescript"),1),b8=J(require("launch-editor"),1);wc();Vc=require("node:child_process");g8();Ia=J(require("@sentry/node"),1);kr();AC=J(require("prettier"),1)});function C8(t,e=0){return(on[t[e+0]]+on[t[e+1]]+on[t[e+2]]+on[t[e+3]]+"-"+on[t[e+4]]+on[t[e+5]]+"-"+on[t[e+6]]+on[t[e+7]]+"-"+on[t[e+8]]+on[t[e+9]]+"-"+on[t[e+10]]+on[t[e+11]]+on[t[e+12]]+on[t[e+13]]+on[t[e+14]]+on[t[e+15]]).toLowerCase()}var on,w8=N(()=>{h();on=[];for(let t=0;t<256;++t)on.push((t+256).toString(16).slice(1))});function IC(){return ky>Iy.length-16&&(S8.default.randomFillSync(Iy),ky=0),Iy.slice(ky,ky+=16)}var S8,Iy,ky,T8=N(()=>{h();S8=J(require("node:crypto")),Iy=new Uint8Array(256),ky=Iy.length});var P8,NC,A8=N(()=>{h();P8=J(require("node:crypto")),NC={randomUUID:P8.default.randomUUID}});function Jle(t,e,r){if(NC.randomUUID&&!e&&!t)return NC.randomUUID();t=t||{};let n=t.random||(t.rng||IC)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return C8(n)}var RC,_8=N(()=>{h();A8();T8();w8();RC=Jle});var F8=N(()=>{h();_8()});function OC(t,e,r){switch(t.code){case"ECONNREFUSED":return new qt({type:"connection_refused",cause:t,message:`Connection refused to ${e}${r?`:${r}`:""}. The server may be down or unreachable.`,suggestions:["Check your internet connection","Try again in a few minutes - the service may be temporarily unavailable","Contact support if the issue persists"],hostname:e,port:r,errorCode:"ECONNREFUSED"});case"ETIMEDOUT":return new qt({type:"connection_timeout",cause:t,message:`Connection timed out to ${e}${r?`:${r}`:""}. The request took too long to complete.`,suggestions:["Check your internet connection speed","Try again in a few minutes","Contact support if the issue persists"],hostname:e,port:r,errorCode:"ETIMEDOUT"});case"ENOTFOUND":return new qt({type:"dns_not_found",cause:t,message:`Cannot resolve ${e}. The server address could not be found.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:e,errorCode:"ENOTFOUND"});default:return new qt({type:"unknown",cause:t,message:`Network error connecting to ${e}: ${t.message}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:e,port:r})}}function vn(t){R.error("\u{1F534} Network Error Details:"),R.error(t.message),t.suggestions.length>0&&(R.info("\u{1F4A1} Troubleshooting suggestions:"),t.suggestions.forEach((e,r)=>{R.info(` ${r+1}. ${e}`)})),t.hostname&&R.info(`\u{1F4CD} Target: ${t.hostname}${t.port?`:${t.port}`:""}`),t.statusCode&&R.info(`\u{1F4CA} HTTP Status: ${t.statusCode}`),t.errorCode&&R.info(`\u{1F527} Error Code: ${t.errorCode}`),console.log(`
|
|
1214
|
+
`)}var At,qt,Ei=N(()=>{"use strict";h();$t();At=class extends Error{},qt=class extends At{constructor({type:e,cause:r,message:n,suggestions:i=[],hostname:s,port:o,statusCode:a,errorCode:c}){super(n,{cause:r}),this.name="NetworkError",this.type=e,this.suggestions=i,this.hostname=s,this.port=o,this.statusCode=a,this.errorCode=c}type;suggestions;hostname;port;statusCode;errorCode}});async function I8(t){let e=process.env.NODE_ENV!=="test",r=await O8(),n=await R8();io.init(e?"2532be1b0436a18cb938b21fc7fa9faf":"",{logLevel:io.Types.LogLevel.None,flushIntervalMillis:500});let i=new io.Identify;return await io.identify(i,{device_id:r,user_id:n,platform:MC.default.type(),os_name:process.platform,os_version:MC.default.release()}).promise,Ps.init({dsn:"https://3252dddc08dbb5bf406dc33bf3c13633@o117565.ingest.us.sentry.io/4505630794448896",tracesSampleRate:0,release:hB,environment:process.env.NODE_ENV,enabled:e,registerEsmLoaderHooks:!1,normalizeDepth:5,maxValueLength:1500,integrations:[Ps.nativeNodeFetchIntegration(),Ps.httpIntegration(),Ps.extraErrorDataIntegration()],beforeSend:(s,o)=>{let a=o.originalException??o.syntheticException;return!(a instanceof At)&&(t||s.level!=="warning")&&console.error((0,k8.red)(`ERROR ID: ${s.event_id}`),a),s},tracePropagationTargets:[]}),Ps.setUser({username:process.env.USER||process.env.USERNAME||"unknown"}),Ps}async function st(t,e){let r={...e,app:"dev-tools-cli",package:"cli"},n=await R8(),i=await O8();return await io.track(t,r,{user_id:n,device_id:i}).promise}async function N8(t){Ny=t;let e=await rp();await FC({...e,userId:t})}async function R8(){if(Ny)return Ny;let t=await rp(),e;return _C(t,"userId")&&(e=t.userId),Ny=e,e}async function O8(){if(BC)return BC;let t=await rp(),e=RC();return _C(t,"deviceId")?e=t.deviceId:await FC({...t,deviceId:e}),BC=e,e}var io,Ps,MC,k8,Ny,BC,Ci=N(()=>{"use strict";h();io=J(require("@amplitude/analytics-node"),1),Ps=J(require("@sentry/node"),1);mB();Gf();F8();MC=J(require("node:os"),1),k8=J(mr(),1);Ei()});var M8,B8=N(()=>{M8="0.0.0"});function L8(t){return t=t.replace(/\\/g,"/"),t.startsWith("/")?t.slice(1):t.startsWith("./")?t.slice(2):t}function $8(t,e,r,n){let i=t.split(`
|
|
1215
1215
|
`),s=Math.max(0,e),o=Math.min(i.length,s+r),a=i.slice(s,o);return n?a.map((l,p)=>{let d=s+p+1,m=l.length>1500?l.substring(0,1500)+"...":l;return`${d.toString().padStart(6)}:${m}`}).join(`
|
|
1216
1216
|
`):a.map(c=>c.length>1500?c.substring(0,1500)+"...":c).join(`
|
|
1217
|
-
`)}function
|
|
1217
|
+
`)}function j8(t,e,r){if(r){if(!Array.isArray(r)||r.length!==2)throw new Error(`The provided viewRange must be an array of 2 numbers, like [1, 100], instead it was \`${JSON.stringify(r)}\``);let n=e.split(`
|
|
1218
1218
|
`),i=Math.max(1,r[0]??0)-1,s=r[1]?Math.max(1,r[1]??0)-1:void 0;if(i>n.length)throw new Error(`The file ${t} only contains up to ${n.length} lines. However, the provided viewRange was \`[${r[0]}, ${r[1]}]\``);return n.slice(i,s).join(`
|
|
1219
1219
|
`)}if(e.length>5e4&&!r){let n=e.split(`
|
|
1220
1220
|
`);throw new Error(`The file content of ${t} is too large to view (${n.length} lines).
|
|
1221
1221
|
Provide a viewRange to view a specific part of the file.
|
|
1222
|
-
The "grep_search" tool can be used to find the relevant part lines of a file.`)}return e}function
|
|
1222
|
+
The "grep_search" tool can be used to find the relevant part lines of a file.`)}return e}function U8(t,e){if(t!=null)return e?t.replace(new RegExp(`\\B${e}/\\b`,"g"),""):t}function q8(t,e){if(!t||!e||e.length===0)return t;let r=t;for(let n of e)if(n&&n.trim()){let i=n.replace(/[.*+?^${}()|[\]\\]/gi,"\\$&");r=r.replace(new RegExp(i,"g"),"******")}return r}var As,Ry=N(()=>{"use strict";h();As=class extends Error{code;constructor(e,r,n){super(e,n),this.name="CodeGenError",this.code=r}}});function Xle(){let e={darwin:"Macintosh",win32:"Windows NT",linux:"Linux",android:"Android",ios:"iPhone"}[LC.default.platform]||"Unknown",r=LC.default.platform==="win32"?"10.0":"";return{"User-Agent":`Mozilla/5.0 (${e}${r?"; "+r:""}) builder-cli/${M8}`,"Sec-Ch-Ua-Platform":e}}var z8,LC,G8,ze,Kr=N(()=>{"use strict";h();z8=require("undici");B8();LC=J(require("node:process"),1),G8=J(require("@sentry/node"),1);Ei();Ry();ze=async(t,e)=>{let r="fetch"in globalThis?globalThis.fetch:z8.fetch,n=typeof t=="string"?t:t instanceof URL?t.toString():t.url,i=new URL(n),s=i.hostname,o=i.port?parseInt(i.port):void 0;try{let a=G8.getTraceData(),c=await r(t,{...e,headers:{...e?.headers,...Xle(),...a}});if(!c.ok){if(c.status===402){let u=await c.json(),l=u.code??"credits-limit-daily",p=u.message??"You've reached the DAY AI credits limit for your current plan.";throw new As(p,l)}else if(c.status===429){let u=await c.json(),l=u.code??"credits-limit-other",p=u.message??"Rate limit exceeded. Please try again later.";throw new As(p,l)}if(c.status>=500){let u;try{let l=await c.text();if(l)try{let p=JSON.parse(l);u=p.message||p.error||l}catch{u=l}}catch{}throw new qt({type:"server_error",cause:u?new Error(u):void 0,message:`Server error from ${s} (HTTP ${c.status}). The server encountered an internal error.`,suggestions:["Try again in a few minutes - this may be a temporary issue","Contact support if the problem persists"],hostname:s,statusCode:c.status})}}return c}catch(a){if(a instanceof qt||a instanceof As||a instanceof Error&&a.name==="AbortError")throw a;if(a instanceof Error){if(a.name==="TypeError"&&a.cause instanceof Error){let p=a.cause;if(p.code)throw OC(p,s,o)}if(a.code)throw OC(a,s,o);if(a.message?.includes("SSL")||a.message?.includes("TLS")||a.message?.includes("certificate")||a.message?.includes("CERT"))throw new qt({type:"ssl_error",cause:a,message:`SSL/TLS error connecting to ${s}. The connection could not be secured.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support@builder.io if the issue persists"],hostname:s})}let c=e?.method||"GET",u=a instanceof Error?a.message:String(a);throw new qt({type:"unknown",cause:a instanceof Error?a:new Error(String(a)),message:`Network error for ${c} ${i.toString()}: ${u}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:s,port:o})}}});function bn(t){if(!t)return"";let e=t.lastIndexOf("#");t=e>-1?t.slice(0,e):t,t=t.normalize("NFD").replace(H8,"");let r=t.match(/^(\d+)(_[^_].*)/);return r&&(t=t.slice(r[1].length)),t=t.replace(/^[^a-zA-Z]+/,""),t=t.replace(/[\W]/g," "),t=t.trim(),t=rpe(t),t=t.charAt(0).toUpperCase()+t.slice(1),t}function $C(t,e,r,n=-1){let i=" ".repeat(Math.max(n+1,0)),s="",o=t.type,a=o==="GROUP"||o==="FRAME"||n<0&&"children"in t,c="",u=n>=0;if(u){let l="";if(t.type==="INSTANCE"){if(t.componentPropertyReferences&&t.componentPropertyReferences.mainComponent)return s+=`${i}{figma[${JSON.stringify(e(t.componentPropertyReferences.mainComponent))}]}
|
|
1223
1223
|
`,s;{let p=r(t?.componentId);p&&(c=bn(p),a=!0)}}c===""&&(c=t.type),(t.type!=="TEXT"||!t.autoRename)&&(l+=` name=${JSON.stringify(t.name)}`),t.componentPropertyReferences&&t.componentPropertyReferences.visible&&(l+=` visible={figma[${JSON.stringify(e(t.componentPropertyReferences.visible))}]}`),s+=`${i}<${c}${l}`}if(t.type==="TEXT")u&&(s+=`>
|
|
1224
1224
|
`),t.componentPropertyReferences&&t.componentPropertyReferences.characters?s+=`${i} {figma[${JSON.stringify(e(t.componentPropertyReferences.characters))}]}
|
|
1225
1225
|
`:s+=`${i} ${t.characters}
|
|
@@ -1227,13 +1227,13 @@ The "grep_search" tool can be used to find the relevant part lines of a file.`)}
|
|
|
1227
1227
|
`);else if(a&&"children"in t&&t.children.length>0){u&&(s+=`>
|
|
1228
1228
|
`);let l=0;for(let p of t.children)s+=$C(p,e,r,n+1),l++;u&&(s+=`${i}</${c}>
|
|
1229
1229
|
`)}else u&&(s+=`/>
|
|
1230
|
-
`);return s}function
|
|
1231
|
-
`)}function Vf(t,e){let r=t?.document??t?.documents[0];if(!r)throw new Error("No document found");let{inputs:n,nameMap:i}=tpe(r),s=a=>{if(!a)return null;let c=t?.componentSets?.[a];if(c)return c.name;let u=t?.components?.[a];return u&&u.componentSetId?s(u.componentSetId):u.name};return{type:r.type,name:r.name,jsx:r.type==="COMPONENT_SET"&&r.children.length>0?$C(r.children[0],i,s):$C(r,i,s),inputs:n,key:r.key,description:r.description,documentationLinks:r.documentationLinks?.map(a=>a.uri)||[],instanceId:e?.includes(":")?e:r.id,documentName:"",tree:""}}function
|
|
1232
|
-
`+await o.text());let a=await o.json();if(!Array.isArray(a.figmaComponents))throw new Error("Invalid response from Figma API");return a.figmaComponents.map(c=>["",c])}function
|
|
1233
|
-
Or make sure the command is copied correctly from the Figma plugin and the same builder space is being used.`),await be(1);p&&({fileID:a,nodeId:c}=p)}if(!r)return[];let u=await
|
|
1234
|
-
Double click and select "Go to main component", then copy the URL to the figma COMPONENT`),ke(i),await be(1)}let n=t.components[e]?.key??t.componentSets[e]?.key;return n?(t.document.key=n,Vf(t,e)):(ke("Pasted URL does not correspond to a component or component set"),await be(1))}async function Oy(t,e,r,n,i){if(i.length>0){let s=await ape(t,e,r,i);for(let o of n)if(o.figmaUrl&&!o.figmaKey){let a=s[o.figmaUrl];a&&(o.figmaKey=a)}}}function cpe(t){return t!=null}var
|
|
1235
|
-
\u274C Not a Figma URL - hostname check failed`),null;let n=r.searchParams.get("node-id")?.replaceAll("-",":"),i=r.pathname.split("/")[2];return n&&i?{fileID:i,nodeId:n}:null}catch{return null}},ipe="https://api.figma.com/v1/",so=async(t,e,r,{auth:n,params:i})=>{let s=new URL(`${ipe}${r}`),o={};if(n.oauth?o.Authorization=`Bearer ${n.access_token}`:o["X-FIGMA-TOKEN"]=n.access_token,i)for(let c in i)i[c]!=null&&s.searchParams.set(c,i[c].toString());let a=await ze(s,{headers:o});if(!a.ok){if(a.status===401){R.error("Seems like figma auth is expired or it's invalid, let's try to");let c=await zt(t,e,{force:!0,requireFigmaAuth:"always"});return so(t,e,r,{auth:c.figmaAuth,params:i})}throw new Error(`Figma REST ${a.statusText}: ${await a.text()}`)}return a.json()},J3=async(t,e,r,n,i,s)=>(await so(t,e,`files/${n}/nodes`,{auth:r,params:{ids:i,depth:s}})).nodes,spe=/^[a-f0-9]{40}$/;ape=async(t,e,r,n)=>{if(!r)return{};let i=new Map,s={};return n.forEach(o=>{let a=Hf(o);if(!a){t.Sentry?.captureException(new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection"),{extra:{figmaUrl:o},level:"warning"});return}let c=i.get(a.fileID);c||(c=[],i.set(a.fileID,c)),c.includes(a.nodeId)||c.push(a.nodeId),s[o]=`${a.fileID}/${a.nodeId}`}),await Promise.all(Array.from(i.entries()).map(async([o,a])=>{let c=await J3(t,e,r,o,a.join(","),0);for(let u of a){let l=c[u],p=l.components[u]?.key??l.componentSets[u]?.key;p||t.Sentry?.withScope(m=>{m.addAttachment({data:JSON.stringify(c,null,2),filename:`${o}.json`}),t.Sentry?.captureException(new Error("Cannot resolve figma component key for NodeID"),{extra:{nodeId:u,fileID:o},level:"warning"})});let d=`${o}/${u}`;for(let m of n)s[m]===d&&(s[m]=p)}})),s}});function GC(t){if(!Array.isArray(t))throw new TypeError(`Expected an array, got \`${typeof t}\`.`);for(let i of t)UC(i);let e=t.some(({readableObjectMode:i})=>i),r=upe(t,e),n=new jC({objectMode:e,writableHighWaterMark:r,readableHighWaterMark:r});for(let i of t)n.add(i);return t.length===0&&i8(n),n}var Ly,t8,zC,upe,jC,lpe,ppe,dpe,UC,fpe,r8,mpe,hpe,gpe,n8,i8,qC,s8,ype,My,Z3,e8,o8=N(()=>{h();Ly=require("node:events"),t8=require("node:stream"),zC=require("node:stream/promises");upe=(t,e)=>{if(t.length===0)return 16384;let r=t.filter(({readableObjectMode:n})=>n===e).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},jC=class extends t8.PassThrough{#l=new Set([]);#g=new Set([]);#E=new Set([]);#c;add(e){UC(e),!this.#l.has(e)&&(this.#l.add(e),this.#c??=lpe(this,this.#l),fpe({passThroughStream:this,stream:e,streams:this.#l,ended:this.#g,aborted:this.#E,onFinished:this.#c}),e.pipe(this,{end:!1}))}remove(e){return UC(e),this.#l.has(e)?(e.unpipe(this),!0):!1}},lpe=async(t,e)=>{My(t,Z3);let r=new AbortController;try{await Promise.race([ppe(t,r),dpe(t,e,r)])}finally{r.abort(),My(t,-Z3)}},ppe=async(t,{signal:e})=>{await(0,zC.finished)(t,{signal:e,cleanup:!0})},dpe=async(t,e,{signal:r})=>{for await(let[n]of(0,Ly.on)(t,"unpipe",{signal:r}))e.has(n)&&n.emit(n8)},UC=t=>{if(typeof t?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`)},fpe=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,onFinished:s})=>{My(t,e8);let o=new AbortController;try{await Promise.race([mpe(s,e),hpe({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:o}),gpe({stream:e,streams:r,ended:n,aborted:i,controller:o})])}finally{o.abort(),My(t,-e8)}r.size===n.size+i.size&&(n.size===0&&i.size>0?qC(t):i8(t))},r8=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",mpe=async(t,e)=>{try{await t,qC(e)}catch(r){r8(r)?qC(e):s8(e,r)}},hpe=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:{signal:s}})=>{try{await(0,zC.finished)(e,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(e)&&n.add(e)}catch(o){if(s.aborted||!r.has(e))return;r8(o)?i.add(e):s8(t,o)}},gpe=async({stream:t,streams:e,ended:r,aborted:n,controller:{signal:i}})=>{await(0,Ly.once)(t,n8,{signal:i}),e.delete(t),r.delete(t),n.delete(t)},n8=Symbol("unpipe"),i8=t=>{t.writable&&t.end()},qC=t=>{(t.readable||t.writable)&&t.destroy()},s8=(t,e)=>{t.destroyed||(t.once("error",ype),t.destroy(e))},ype=()=>{},My=(t,e)=>{let r=t.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&t.setMaxListeners(r+e)},Z3=2,e8=1});var a8=S(np=>{"use strict";h();Object.defineProperty(np,"__esModule",{value:!0});np.splitWhen=np.flatten=void 0;function vpe(t){return t.reduce((e,r)=>[].concat(e,r),[])}np.flatten=vpe;function bpe(t,e){let r=[[]],n=0;for(let i of t)e(i)?(n++,r[n]=[]):r[n].push(i);return r}np.splitWhen=bpe});var c8=S($y=>{"use strict";h();Object.defineProperty($y,"__esModule",{value:!0});$y.isEnoentCodeError=void 0;function xpe(t){return t.code==="ENOENT"}$y.isEnoentCodeError=xpe});var u8=S(jy=>{"use strict";h();Object.defineProperty(jy,"__esModule",{value:!0});jy.createDirentFromStats=void 0;var VC=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Dpe(t,e){return new VC(t,e)}jy.createDirentFromStats=Dpe});var f8=S(Rr=>{"use strict";h();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.convertPosixPathToPattern=Rr.convertWindowsPathToPattern=Rr.convertPathToPattern=Rr.escapePosixPath=Rr.escapeWindowsPath=Rr.escape=Rr.removeLeadingDotSegment=Rr.makeAbsolute=Rr.unixify=void 0;var Epe=require("os"),Cpe=require("path"),l8=Epe.platform()==="win32",wpe=2,Spe=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Tpe=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Ppe=/^\\\\([.?])/,Ape=/\\(?![!()+@[\]{}])/g;function _pe(t){return t.replace(/\\/g,"/")}Rr.unixify=_pe;function Fpe(t,e){return Cpe.resolve(t,e)}Rr.makeAbsolute=Fpe;function kpe(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(wpe)}return t}Rr.removeLeadingDotSegment=kpe;Rr.escape=l8?HC:KC;function HC(t){return t.replace(Tpe,"\\$2")}Rr.escapeWindowsPath=HC;function KC(t){return t.replace(Spe,"\\$2")}Rr.escapePosixPath=KC;Rr.convertPathToPattern=l8?p8:d8;function p8(t){return HC(t).replace(Ppe,"//$1").replace(Ape,"/")}Rr.convertWindowsPathToPattern=p8;function d8(t){return KC(t)}Rr.convertPosixPathToPattern=d8});var h8=S((Dze,m8)=>{h();m8.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var v8=S((Cze,y8)=>{h();var Ipe=h8(),g8={"{":"}","(":")","[":"]"},Npe=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,n=-2,i=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(o===-1||o>n||(o=t.indexOf("\\",e),o===-1||o>n)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var c=g8[a];if(c){var u=t.indexOf(c,e);u!==-1&&(e=u+1)}if(t[e]==="!")return!0}else e++}return!1},Rpe=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var n=g8[r];if(n){var i=t.indexOf(n,e);i!==-1&&(e=i+1)}if(t[e]==="!")return!0}else e++}return!1};y8.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(Ipe(e))return!0;var n=Npe;return r&&r.strict===!1&&(n=Rpe),n(e)}});var x8=S((Sze,b8)=>{"use strict";h();var Ope=v8(),Bpe=require("path").posix.dirname,Mpe=require("os").platform()==="win32",WC="/",Lpe=/\\/g,$pe=/[\{\[].*[\}\]]$/,jpe=/(^|[^\\])([\{\[]|\([^\)]+$)/,Upe=/\\([\!\*\?\|\[\]\(\)\{\}])/g;b8.exports=function(e,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Mpe&&e.indexOf(WC)<0&&(e=e.replace(Lpe,WC)),$pe.test(e)&&(e+=WC),e+="a";do e=Bpe(e);while(Ope(e)||jpe.test(e));return e.replace(Upe,"$1")}});var Uy=S(Ki=>{"use strict";h();Ki.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Ki.find=(t,e)=>t.nodes.find(r=>r.type===e);Ki.exceedsLimit=(t,e,r=1,n)=>n===!1||!Ki.isInteger(t)||!Ki.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=n;Ki.escapeNode=(t,e=0,r)=>{let n=t.nodes[e];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};Ki.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;Ki.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Ki.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Ki.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Ki.flatten=(...t)=>{let e=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){r(s);continue}s!==void 0&&e.push(s)}return e};return r(t),e}});var qy=S((_ze,E8)=>{"use strict";h();var D8=Uy();E8.exports=(t,e={})=>{let r=(n,i={})=>{let s=e.escapeInvalid&&D8.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(s||o)&&D8.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(t)}});var w8=S((kze,C8)=>{"use strict";h();C8.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var N8=S((Nze,I8)=>{"use strict";h();var S8=w8(),Kc=(t,e,r)=>{if(S8(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(S8(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),c=t+":"+e+"="+i+s+o+a;if(Kc.cache.hasOwnProperty(c))return Kc.cache[c].result;let u=Math.min(t,e),l=Math.max(t,e);if(Math.abs(u-l)===1){let g=t+"|"+e;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let p=k8(t)||k8(e),d={min:t,max:e,a:u,b:l},m=[],f=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){let g=l<0?Math.abs(l):1;f=T8(g,Math.abs(u),d,n),u=d.a=0}return l>=0&&(m=T8(u,l,d,n)),d.negatives=f,d.positives=m,d.result=qpe(f,m,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&m.length+f.length>1&&(d.result=`(?:${d.result})`),Kc.cache[c]=d,d.result};function qpe(t,e,r){let n=JC(t,e,"-",!1,r)||[],i=JC(e,t,"",!1,r)||[],s=JC(t,e,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function zpe(t,e){let r=1,n=1,i=A8(t,r),s=new Set([e]);for(;t<=i&&i<=e;)s.add(i),r+=1,i=A8(t,r);for(i=_8(e+1,n)-1;t<i&&i<=e;)s.add(i),n+=1,i=_8(e+1,n)-1;return s=[...s],s.sort(Hpe),s}function Gpe(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let n=Vpe(t,e),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[c,u]=n[a];c===u?s+=c:c!=="0"||u!=="9"?s+=Kpe(c,u,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function T8(t,e,r,n){let i=zpe(t,e),s=[],o=t,a;for(let c=0;c<i.length;c++){let u=i[c],l=Gpe(String(o),String(u),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+F8(a.count),o=u+1;continue}r.isPadded&&(p=Wpe(u,r,n)),l.string=p+l.pattern+F8(l.count),s.push(l),o=u+1,a=l}return s}function JC(t,e,r,n,i){let s=[];for(let o of t){let{string:a}=o;!n&&!P8(e,"string",a)&&s.push(r+a),n&&P8(e,"string",a)&&s.push(r+a)}return s}function Vpe(t,e){let r=[];for(let n=0;n<t.length;n++)r.push([t[n],e[n]]);return r}function Hpe(t,e){return t>e?1:e>t?-1:0}function P8(t,e,r){return t.some(n=>n[e]===r)}function A8(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function _8(t,e){return t-t%Math.pow(10,e)}function F8(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Kpe(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function k8(t){return/^-?(0+)\d/.test(t)}function Wpe(t,e,r){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}Kc.cache={};Kc.clearCache=()=>Kc.cache={};I8.exports=Kc});var QC=S((Oze,j8)=>{"use strict";h();var Jpe=require("util"),O8=N8(),R8=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Ype=t=>e=>t===!0?Number(e):String(e),YC=t=>typeof t=="number"||typeof t=="string"&&t!=="",Kf=t=>Number.isInteger(+t),XC=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Xpe=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Qpe=(t,e,r)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return r===!1?String(t):t},Gy=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},Zpe=(t,e,r)=>{t.negatives.sort((a,c)=>a<c?-1:a>c?1:0),t.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=e.capture?"":"?:",i="",s="",o;return t.positives.length&&(i=t.positives.map(a=>Gy(String(a),r)).join("|")),t.negatives.length&&(s=`-(${n}${t.negatives.map(a=>Gy(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,e.wrap?`(${n}${o})`:o},B8=(t,e,r,n)=>{if(r)return O8(t,e,{wrap:!1,...n});let i=String.fromCharCode(t);if(t===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},M8=(t,e,r)=>{if(Array.isArray(t)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${t.join("|")})`:t.join("|")}return O8(t,e,r)},L8=(...t)=>new RangeError("Invalid range arguments: "+Jpe.inspect(...t)),$8=(t,e,r)=>{if(r.strictRanges===!0)throw L8([t,e]);return[]},ede=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},tde=(t,e,r=1,n={})=>{let i=Number(t),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw L8([t,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(t),c=String(e),u=String(r);r=Math.max(Math.abs(r),1);let l=XC(a)||XC(c)||XC(u),p=l?Math.max(a.length,c.length,u.length):0,d=l===!1&&Xpe(t,e,n)===!1,m=n.transform||Ype(d);if(n.toRegex&&r===1)return B8(Gy(t,p),Gy(e,p),!0,n);let f={negatives:[],positives:[]},g=D=>f[D<0?"negatives":"positives"].push(Math.abs(D)),y=[],v=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?g(i):y.push(Qpe(m(i,v),p,d)),i=o?i-r:i+r,v++;return n.toRegex===!0?r>1?Zpe(f,n,p):M8(y,null,{wrap:!1,...n}):y},rde=(t,e,r=1,n={})=>{if(!Kf(t)&&t.length>1||!Kf(e)&&e.length>1)return $8(t,e,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,c=Math.min(s,o),u=Math.max(s,o);if(n.toRegex&&r===1)return B8(c,u,!1,n);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?M8(l,null,{wrap:!1,options:n}):l},zy=(t,e,r,n={})=>{if(e==null&&YC(t))return[t];if(!YC(t)||!YC(e))return $8(t,e,n);if(typeof r=="function")return zy(t,e,1,{transform:r});if(R8(r))return zy(t,e,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,Kf(r)?Kf(t)&&Kf(e)?tde(t,e,r,i):rde(t,e,Math.max(Math.abs(r),1),i):r!=null&&!R8(r)?ede(r,i):zy(t,e,1,r)};j8.exports=zy});var z8=S((Mze,q8)=>{"use strict";h();var nde=QC(),U8=Uy(),ide=(t,e={})=>{let r=(n,i={})=>{let s=U8.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,c=e.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=U8.reduce(n.nodes),p=nde(...l,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)u+=r(l,n);return u};return r(t)};q8.exports=ide});var H8=S(($ze,V8)=>{"use strict";h();var sde=QC(),G8=qy(),ip=Uy(),Wc=(t="",e="",r=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?ip.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)n.push(Wc(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?Wc(i,s,r):i+s);return ip.flatten(n)},ode=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(Wc(a.pop(),G8(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(Wc(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=ip.reduce(i.nodes);if(ip.exceedsLimit(...p,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=sde(...p,e);d.length===0&&(d=G8(i,e)),a.push(Wc(a.pop(),d)),i.nodes=[];return}let c=ip.encloseBrace(i),u=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,u=l.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&u.push(""),u.push("");continue}if(d.type==="close"){a.push(Wc(a.pop(),u,c));continue}if(d.value&&d.type!=="open"){u.push(Wc(u.pop(),d.value));continue}d.nodes&&n(d,i)}return u};return ip.flatten(n(t))};V8.exports=ode});var W8=S((Uze,K8)=>{"use strict";h();K8.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
1236
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Z8=S((zze,Q8)=>{"use strict";h();var ade=qy(),{MAX_LENGTH:J8,CHAR_BACKSLASH:ZC,CHAR_BACKTICK:cde,CHAR_COMMA:ude,CHAR_DOT:lde,CHAR_LEFT_PARENTHESES:pde,CHAR_RIGHT_PARENTHESES:dde,CHAR_LEFT_CURLY_BRACE:fde,CHAR_RIGHT_CURLY_BRACE:mde,CHAR_LEFT_SQUARE_BRACKET:Y8,CHAR_RIGHT_SQUARE_BRACKET:X8,CHAR_DOUBLE_QUOTE:hde,CHAR_SINGLE_QUOTE:gde,CHAR_NO_BREAK_SPACE:yde,CHAR_ZERO_WIDTH_NOBREAK_SPACE:vde}=W8(),bde=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min(J8,r.maxLength):J8;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],o=i,a=i,c=0,u=t.length,l=0,p=0,d,m=()=>t[l++],f=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(f({type:"bos"});l<u;)if(o=s[s.length-1],d=m(),!(d===vde||d===yde)){if(d===ZC){f({type:"text",value:(e.keepEscaping?d:"")+m()});continue}if(d===X8){f({type:"text",value:"\\"+d});continue}if(d===Y8){c++;let g;for(;l<u&&(g=m());){if(d+=g,g===Y8){c++;continue}if(g===ZC){d+=m();continue}if(g===X8&&(c--,c===0))break}f({type:"text",value:d});continue}if(d===pde){o=f({type:"paren",nodes:[]}),s.push(o),f({type:"text",value:d});continue}if(d===dde){if(o.type!=="paren"){f({type:"text",value:d});continue}o=s.pop(),f({type:"text",value:d}),o=s[s.length-1];continue}if(d===hde||d===gde||d===cde){let g=d,y;for(e.keepQuotes!==!0&&(d="");l<u&&(y=m());){if(y===ZC){d+=y+m();continue}if(y===g){e.keepQuotes===!0&&(d+=y);break}d+=y}f({type:"text",value:d});continue}if(d===fde){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=f(y),s.push(o),f({type:"open",value:d});continue}if(d===mde){if(o.type!=="brace"){f({type:"text",value:d});continue}let g="close";o=s.pop(),o.close=!0,f({type:g,value:d}),p--,o=s[s.length-1];continue}if(d===ude&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:ade(o)}]}f({type:"comma",value:d}),o.commas++;continue}if(d===lde&&p>0&&o.commas===0){let g=o.nodes;if(p===0||g.length===0){f({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let y=g[g.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}f({type:"dot",value:d});continue}f({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(v=>{v.nodes||(v.type==="open"&&(v.isOpen=!0),v.type==="close"&&(v.isClose=!0),v.nodes||(v.type="text"),v.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(o);g.nodes.splice(y,1,...o.nodes)}while(s.length>0);return f({type:"eos"}),i};Q8.exports=bde});var rL=S((Vze,tL)=>{"use strict";h();var eL=qy(),xde=z8(),Dde=H8(),Ede=Z8(),wi=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=wi.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(wi.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};wi.parse=(t,e={})=>Ede(t,e);wi.stringify=(t,e={})=>eL(typeof t=="string"?wi.parse(t,e):t,e);wi.compile=(t,e={})=>(typeof t=="string"&&(t=wi.parse(t,e)),xde(t,e));wi.expand=(t,e={})=>{typeof t=="string"&&(t=wi.parse(t,e));let r=Dde(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};wi.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?wi.compile(t,e):wi.expand(t,e);tL.exports=wi});var Wf=S((Kze,aL)=>{"use strict";h();var Cde=require("path"),oo="\\\\/",nL=`[^${oo}]`,Wo="\\.",wde="\\+",Sde="\\?",Vy="\\/",Tde="(?=.)",iL="[^/]",ew=`(?:${Vy}|$)`,sL=`(?:^|${Vy})`,tw=`${Wo}{1,2}${ew}`,Pde=`(?!${Wo})`,Ade=`(?!${sL}${tw})`,_de=`(?!${Wo}{0,1}${ew})`,Fde=`(?!${tw})`,kde=`[^.${Vy}]`,Ide=`${iL}*?`,oL={DOT_LITERAL:Wo,PLUS_LITERAL:wde,QMARK_LITERAL:Sde,SLASH_LITERAL:Vy,ONE_CHAR:Tde,QMARK:iL,END_ANCHOR:ew,DOTS_SLASH:tw,NO_DOT:Pde,NO_DOTS:Ade,NO_DOT_SLASH:_de,NO_DOTS_SLASH:Fde,QMARK_NO_DOT:kde,STAR:Ide,START_ANCHOR:sL},Nde={...oL,SLASH_LITERAL:`[${oo}]`,QMARK:nL,STAR:`${nL}*?`,DOTS_SLASH:`${Wo}{1,2}(?:[${oo}]|$)`,NO_DOT:`(?!${Wo})`,NO_DOTS:`(?!(?:^|[${oo}])${Wo}{1,2}(?:[${oo}]|$))`,NO_DOT_SLASH:`(?!${Wo}{0,1}(?:[${oo}]|$))`,NO_DOTS_SLASH:`(?!${Wo}{1,2}(?:[${oo}]|$))`,QMARK_NO_DOT:`[^.${oo}]`,START_ANCHOR:`(?:^|[${oo}])`,END_ANCHOR:`(?:[${oo}]|$)`},Rde={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};aL.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Rde,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Cde.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?Nde:oL}}});var Jf=S(ti=>{"use strict";h();var Ode=require("path"),Bde=process.platform==="win32",{REGEX_BACKSLASH:Mde,REGEX_REMOVE_BACKSLASH:Lde,REGEX_SPECIAL_CHARS:$de,REGEX_SPECIAL_CHARS_GLOBAL:jde}=Wf();ti.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ti.hasRegexChars=t=>$de.test(t);ti.isRegexChar=t=>t.length===1&&ti.hasRegexChars(t);ti.escapeRegex=t=>t.replace(jde,"\\$1");ti.toPosixSlashes=t=>t.replace(Mde,"/");ti.removeBackslashes=t=>t.replace(Lde,e=>e==="\\"?"":e);ti.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ti.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Bde===!0||Ode.sep==="\\";ti.escapeLast=(t,e,r)=>{let n=t.lastIndexOf(e,r);return n===-1?t:t[n-1]==="\\"?ti.escapeLast(t,e,n-1):`${t.slice(0,n)}\\${t.slice(n)}`};ti.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ti.wrapOutput=(t,e={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${t})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var hL=S((Xze,mL)=>{"use strict";h();var cL=Jf(),{CHAR_ASTERISK:rw,CHAR_AT:Ude,CHAR_BACKWARD_SLASH:Yf,CHAR_COMMA:qde,CHAR_DOT:nw,CHAR_EXCLAMATION_MARK:iw,CHAR_FORWARD_SLASH:fL,CHAR_LEFT_CURLY_BRACE:sw,CHAR_LEFT_PARENTHESES:ow,CHAR_LEFT_SQUARE_BRACKET:zde,CHAR_PLUS:Gde,CHAR_QUESTION_MARK:uL,CHAR_RIGHT_CURLY_BRACE:Vde,CHAR_RIGHT_PARENTHESES:lL,CHAR_RIGHT_SQUARE_BRACKET:Hde}=Wf(),pL=t=>t===fL||t===Yf,dL=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Kde=(t,e)=>{let r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=t,u=-1,l=0,p=0,d=!1,m=!1,f=!1,g=!1,y=!1,v=!1,D=!1,E=!1,x=!1,b=!1,C=0,w,F,P={value:"",depth:0,isGlob:!1},A=()=>u>=n,_=()=>c.charCodeAt(u+1),z=()=>(w=F,c.charCodeAt(++u));for(;u<n;){F=z();let j;if(F===Yf){D=P.backslashes=!0,F=z(),F===sw&&(v=!0);continue}if(v===!0||F===sw){for(C++;A()!==!0&&(F=z());){if(F===Yf){D=P.backslashes=!0,z();continue}if(F===sw){C++;continue}if(v!==!0&&F===nw&&(F=z())===nw){if(d=P.isBrace=!0,f=P.isGlob=!0,b=!0,i===!0)continue;break}if(v!==!0&&F===qde){if(d=P.isBrace=!0,f=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===Vde&&(C--,C===0)){v=!1,d=P.isBrace=!0,b=!0;break}}if(i===!0)continue;break}if(F===fL){if(s.push(u),o.push(P),P={value:"",depth:0,isGlob:!1},b===!0)continue;if(w===nw&&u===l+1){l+=2;continue}p=u+1;continue}if(r.noext!==!0&&(F===Gde||F===Ude||F===rw||F===uL||F===iw)===!0&&_()===ow){if(f=P.isGlob=!0,g=P.isExtglob=!0,b=!0,F===iw&&u===l&&(x=!0),i===!0){for(;A()!==!0&&(F=z());){if(F===Yf){D=P.backslashes=!0,F=z();continue}if(F===lL){f=P.isGlob=!0,b=!0;break}}continue}break}if(F===rw){if(w===rw&&(y=P.isGlobstar=!0),f=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===uL){if(f=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===zde){for(;A()!==!0&&(j=z());){if(j===Yf){D=P.backslashes=!0,z();continue}if(j===Hde){m=P.isBracket=!0,f=P.isGlob=!0,b=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&F===iw&&u===l){E=P.negated=!0,l++;continue}if(r.noparen!==!0&&F===ow){if(f=P.isGlob=!0,i===!0){for(;A()!==!0&&(F=z());){if(F===ow){D=P.backslashes=!0,F=z();continue}if(F===lL){b=!0;break}}continue}break}if(f===!0){if(b=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,f=!1);let M=c,U="",k="";l>0&&(U=c.slice(0,l),c=c.slice(l),p-=l),M&&f===!0&&p>0?(M=c.slice(0,p),k=c.slice(p)):f===!0?(M="",k=c):M=c,M&&M!==""&&M!=="/"&&M!==c&&pL(M.charCodeAt(M.length-1))&&(M=M.slice(0,-1)),r.unescape===!0&&(k&&(k=cL.removeBackslashes(k)),M&&D===!0&&(M=cL.removeBackslashes(M)));let O={prefix:U,input:t,start:l,base:M,glob:k,isBrace:d,isBracket:m,isGlob:f,isExtglob:g,isGlobstar:y,negated:E,negatedExtglob:x};if(r.tokens===!0&&(O.maxDepth=0,pL(F)||o.push(P),O.tokens=o),r.parts===!0||r.tokens===!0){let j;for(let G=0;G<s.length;G++){let Q=j?j+1:l,$=s[G],H=t.slice(Q,$);r.tokens&&(G===0&&l!==0?(o[G].isPrefix=!0,o[G].value=U):o[G].value=H,dL(o[G]),O.maxDepth+=o[G].depth),(G!==0||H!=="")&&a.push(H),j=$}if(j&&j+1<t.length){let G=t.slice(j+1);a.push(G),r.tokens&&(o[o.length-1].value=G,dL(o[o.length-1]),O.maxDepth+=o[o.length-1].depth)}O.slashes=s,O.parts=a}return O};mL.exports=Kde});var vL=S((Zze,yL)=>{"use strict";h();var Hy=Wf(),Si=Jf(),{MAX_LENGTH:Ky,POSIX_REGEX_SOURCE:Wde,REGEX_NON_SPECIAL_CHARS:Jde,REGEX_SPECIAL_CHARS_BACKREF:Yde,REPLACEMENTS:gL}=Hy,Xde=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>Si.escapeRegex(i)).join("..")}return r},sp=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,aw=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=gL[t]||t;let r={...e},n=typeof r.maxLength=="number"?Math.min(Ky,r.maxLength):Ky,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",c=Si.isWindows(e),u=Hy.globChars(c),l=Hy.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:m,ONE_CHAR:f,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:v,NO_DOTS_SLASH:D,QMARK:E,QMARK_NO_DOT:x,STAR:b,START_ANCHOR:C}=u,w=ue=>`(${a}(?:(?!${C}${ue.dot?g:p}).)*?)`,F=r.dot?"":y,P=r.dot?E:x,A=r.bash===!0?w(r):b;r.capture&&(A=`(${A})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let _={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Si.removePrefix(t,_),i=t.length;let z=[],M=[],U=[],k=s,O,j=()=>_.index===i-1,G=_.peek=(ue=1)=>t[_.index+ue],Q=_.advance=()=>t[++_.index]||"",$=()=>t.slice(_.index+1),H=(ue="",Ee=0)=>{_.consumed+=ue,_.index+=Ee},Z=ue=>{_.output+=ue.output!=null?ue.output:ue.value,H(ue.value)},le=()=>{let ue=1;for(;G()==="!"&&(G(2)!=="("||G(3)==="?");)Q(),_.start++,ue++;return ue%2===0?!1:(_.negated=!0,_.start++,!0)},pe=ue=>{_[ue]++,U.push(ue)},fe=ue=>{_[ue]--,U.pop()},oe=ue=>{if(k.type==="globstar"){let Ee=_.braces>0&&(ue.type==="comma"||ue.type==="brace"),re=ue.extglob===!0||z.length&&(ue.type==="pipe"||ue.type==="paren");ue.type!=="slash"&&ue.type!=="paren"&&!Ee&&!re&&(_.output=_.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=A,_.output+=k.output)}if(z.length&&ue.type!=="paren"&&(z[z.length-1].inner+=ue.value),(ue.value||ue.output)&&Z(ue),k&&k.type==="text"&&ue.type==="text"){k.value+=ue.value,k.output=(k.output||"")+ue.value;return}ue.prev=k,o.push(ue),k=ue},Ge=(ue,Ee)=>{let re={...l[Ee],conditions:1,inner:""};re.prev=k,re.parens=_.parens,re.output=_.output;let Re=(r.capture?"(":"")+re.open;pe("parens"),oe({type:ue,value:Ee,output:_.output?"":f}),oe({type:"paren",extglob:!0,value:Q(),output:Re}),z.push(re)},ct=ue=>{let Ee=ue.close+(r.capture?")":""),re;if(ue.type==="negate"){let Re=A;if(ue.inner&&ue.inner.length>1&&ue.inner.includes("/")&&(Re=w(r)),(Re!==A||j()||/^\)+$/.test($()))&&(Ee=ue.close=`)$))${Re}`),ue.inner.includes("*")&&(re=$())&&/^\.[^\\/.]+$/.test(re)){let ye=aw(re,{...e,fastpaths:!1}).output;Ee=ue.close=`)${ye})${Re})`}ue.prev.type==="bos"&&(_.negatedExtglob=!0)}oe({type:"paren",extglob:!0,value:O,output:Ee}),fe("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let ue=!1,Ee=t.replace(Yde,(re,Re,ye,Pe,Y,ce)=>Pe==="\\"?(ue=!0,re):Pe==="?"?Re?Re+Pe+(Y?E.repeat(Y.length):""):ce===0?P+(Y?E.repeat(Y.length):""):E.repeat(ye.length):Pe==="."?p.repeat(ye.length):Pe==="*"?Re?Re+Pe+(Y?A:""):A:Re?re:`\\${re}`);return ue===!0&&(r.unescape===!0?Ee=Ee.replace(/\\/g,""):Ee=Ee.replace(/\\+/g,re=>re.length%2===0?"\\\\":re?"\\":"")),Ee===t&&r.contains===!0?(_.output=t,_):(_.output=Si.wrapOutput(Ee,_,e),_)}for(;!j();){if(O=Q(),O==="\0")continue;if(O==="\\"){let re=G();if(re==="/"&&r.bash!==!0||re==="."||re===";")continue;if(!re){O+="\\",oe({type:"text",value:O});continue}let Re=/^\\+/.exec($()),ye=0;if(Re&&Re[0].length>2&&(ye=Re[0].length,_.index+=ye,ye%2!==0&&(O+="\\")),r.unescape===!0?O=Q():O+=Q(),_.brackets===0){oe({type:"text",value:O});continue}}if(_.brackets>0&&(O!=="]"||k.value==="["||k.value==="[^")){if(r.posix!==!1&&O===":"){let re=k.value.slice(1);if(re.includes("[")&&(k.posix=!0,re.includes(":"))){let Re=k.value.lastIndexOf("["),ye=k.value.slice(0,Re),Pe=k.value.slice(Re+2),Y=Wde[Pe];if(Y){k.value=ye+Y,_.backtrack=!0,Q(),!s.output&&o.indexOf(k)===1&&(s.output=f);continue}}}(O==="["&&G()!==":"||O==="-"&&G()==="]")&&(O=`\\${O}`),O==="]"&&(k.value==="["||k.value==="[^")&&(O=`\\${O}`),r.posix===!0&&O==="!"&&k.value==="["&&(O="^"),k.value+=O,Z({value:O});continue}if(_.quotes===1&&O!=='"'){O=Si.escapeRegex(O),k.value+=O,Z({value:O});continue}if(O==='"'){_.quotes=_.quotes===1?0:1,r.keepQuotes===!0&&oe({type:"text",value:O});continue}if(O==="("){pe("parens"),oe({type:"paren",value:O});continue}if(O===")"){if(_.parens===0&&r.strictBrackets===!0)throw new SyntaxError(sp("opening","("));let re=z[z.length-1];if(re&&_.parens===re.parens+1){ct(z.pop());continue}oe({type:"paren",value:O,output:_.parens?")":"\\)"}),fe("parens");continue}if(O==="["){if(r.nobracket===!0||!$().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(sp("closing","]"));O=`\\${O}`}else pe("brackets");oe({type:"bracket",value:O});continue}if(O==="]"){if(r.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){oe({type:"text",value:O,output:`\\${O}`});continue}if(_.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(sp("opening","["));oe({type:"text",value:O,output:`\\${O}`});continue}fe("brackets");let re=k.value.slice(1);if(k.posix!==!0&&re[0]==="^"&&!re.includes("/")&&(O=`/${O}`),k.value+=O,Z({value:O}),r.literalBrackets===!1||Si.hasRegexChars(re))continue;let Re=Si.escapeRegex(k.value);if(_.output=_.output.slice(0,-k.value.length),r.literalBrackets===!0){_.output+=Re,k.value=Re;continue}k.value=`(${a}${Re}|${k.value})`,_.output+=k.value;continue}if(O==="{"&&r.nobrace!==!0){pe("braces");let re={type:"brace",value:O,output:"(",outputIndex:_.output.length,tokensIndex:_.tokens.length};M.push(re),oe(re);continue}if(O==="}"){let re=M[M.length-1];if(r.nobrace===!0||!re){oe({type:"text",value:O,output:O});continue}let Re=")";if(re.dots===!0){let ye=o.slice(),Pe=[];for(let Y=ye.length-1;Y>=0&&(o.pop(),ye[Y].type!=="brace");Y--)ye[Y].type!=="dots"&&Pe.unshift(ye[Y].value);Re=Xde(Pe,r),_.backtrack=!0}if(re.comma!==!0&&re.dots!==!0){let ye=_.output.slice(0,re.outputIndex),Pe=_.tokens.slice(re.tokensIndex);re.value=re.output="\\{",O=Re="\\}",_.output=ye;for(let Y of Pe)_.output+=Y.output||Y.value}oe({type:"brace",value:O,output:Re}),fe("braces"),M.pop();continue}if(O==="|"){z.length>0&&z[z.length-1].conditions++,oe({type:"text",value:O});continue}if(O===","){let re=O,Re=M[M.length-1];Re&&U[U.length-1]==="braces"&&(Re.comma=!0,re="|"),oe({type:"comma",value:O,output:re});continue}if(O==="/"){if(k.type==="dot"&&_.index===_.start+1){_.start=_.index+1,_.consumed="",_.output="",o.pop(),k=s;continue}oe({type:"slash",value:O,output:m});continue}if(O==="."){if(_.braces>0&&k.type==="dot"){k.value==="."&&(k.output=p);let re=M[M.length-1];k.type="dots",k.output+=O,k.value+=O,re.dots=!0;continue}if(_.braces+_.parens===0&&k.type!=="bos"&&k.type!=="slash"){oe({type:"text",value:O,output:p});continue}oe({type:"dot",value:O,output:p});continue}if(O==="?"){if(!(k&&k.value==="(")&&r.noextglob!==!0&&G()==="("&&G(2)!=="?"){Ge("qmark",O);continue}if(k&&k.type==="paren"){let Re=G(),ye=O;if(Re==="<"&&!Si.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(k.value==="("&&!/[!=<:]/.test(Re)||Re==="<"&&!/<([!=]|\w+>)/.test($()))&&(ye=`\\${O}`),oe({type:"text",value:O,output:ye});continue}if(r.dot!==!0&&(k.type==="slash"||k.type==="bos")){oe({type:"qmark",value:O,output:x});continue}oe({type:"qmark",value:O,output:E});continue}if(O==="!"){if(r.noextglob!==!0&&G()==="("&&(G(2)!=="?"||!/[!=<:]/.test(G(3)))){Ge("negate",O);continue}if(r.nonegate!==!0&&_.index===0){le();continue}}if(O==="+"){if(r.noextglob!==!0&&G()==="("&&G(2)!=="?"){Ge("plus",O);continue}if(k&&k.value==="("||r.regex===!1){oe({type:"plus",value:O,output:d});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||_.parens>0){oe({type:"plus",value:O});continue}oe({type:"plus",value:d});continue}if(O==="@"){if(r.noextglob!==!0&&G()==="("&&G(2)!=="?"){oe({type:"at",extglob:!0,value:O,output:""});continue}oe({type:"text",value:O});continue}if(O!=="*"){(O==="$"||O==="^")&&(O=`\\${O}`);let re=Jde.exec($());re&&(O+=re[0],_.index+=re[0].length),oe({type:"text",value:O});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=O,k.output=A,_.backtrack=!0,_.globstar=!0,H(O);continue}let ue=$();if(r.noextglob!==!0&&/^\([^?]/.test(ue)){Ge("star",O);continue}if(k.type==="star"){if(r.noglobstar===!0){H(O);continue}let re=k.prev,Re=re.prev,ye=re.type==="slash"||re.type==="bos",Pe=Re&&(Re.type==="star"||Re.type==="globstar");if(r.bash===!0&&(!ye||ue[0]&&ue[0]!=="/")){oe({type:"star",value:O,output:""});continue}let Y=_.braces>0&&(re.type==="comma"||re.type==="brace"),ce=z.length&&(re.type==="pipe"||re.type==="paren");if(!ye&&re.type!=="paren"&&!Y&&!ce){oe({type:"star",value:O,output:""});continue}for(;ue.slice(0,3)==="/**";){let we=t[_.index+4];if(we&&we!=="/")break;ue=ue.slice(3),H("/**",3)}if(re.type==="bos"&&j()){k.type="globstar",k.value+=O,k.output=w(r),_.output=k.output,_.globstar=!0,H(O);continue}if(re.type==="slash"&&re.prev.type!=="bos"&&!Pe&&j()){_.output=_.output.slice(0,-(re.output+k.output).length),re.output=`(?:${re.output}`,k.type="globstar",k.output=w(r)+(r.strictSlashes?")":"|$)"),k.value+=O,_.globstar=!0,_.output+=re.output+k.output,H(O);continue}if(re.type==="slash"&&re.prev.type!=="bos"&&ue[0]==="/"){let we=ue[1]!==void 0?"|$":"";_.output=_.output.slice(0,-(re.output+k.output).length),re.output=`(?:${re.output}`,k.type="globstar",k.output=`${w(r)}${m}|${m}${we})`,k.value+=O,_.output+=re.output+k.output,_.globstar=!0,H(O+Q()),oe({type:"slash",value:"/",output:""});continue}if(re.type==="bos"&&ue[0]==="/"){k.type="globstar",k.value+=O,k.output=`(?:^|${m}|${w(r)}${m})`,_.output=k.output,_.globstar=!0,H(O+Q()),oe({type:"slash",value:"/",output:""});continue}_.output=_.output.slice(0,-k.output.length),k.type="globstar",k.output=w(r),k.value+=O,_.output+=k.output,_.globstar=!0,H(O);continue}let Ee={type:"star",value:O,output:A};if(r.bash===!0){Ee.output=".*?",(k.type==="bos"||k.type==="slash")&&(Ee.output=F+Ee.output),oe(Ee);continue}if(k&&(k.type==="bracket"||k.type==="paren")&&r.regex===!0){Ee.output=O,oe(Ee);continue}(_.index===_.start||k.type==="slash"||k.type==="dot")&&(k.type==="dot"?(_.output+=v,k.output+=v):r.dot===!0?(_.output+=D,k.output+=D):(_.output+=F,k.output+=F),G()!=="*"&&(_.output+=f,k.output+=f)),oe(Ee)}for(;_.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(sp("closing","]"));_.output=Si.escapeLast(_.output,"["),fe("brackets")}for(;_.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(sp("closing",")"));_.output=Si.escapeLast(_.output,"("),fe("parens")}for(;_.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(sp("closing","}"));_.output=Si.escapeLast(_.output,"{"),fe("braces")}if(r.strictSlashes!==!0&&(k.type==="star"||k.type==="bracket")&&oe({type:"maybe_slash",value:"",output:`${m}?`}),_.backtrack===!0){_.output="";for(let ue of _.tokens)_.output+=ue.output!=null?ue.output:ue.value,ue.suffix&&(_.output+=ue.suffix)}return _};aw.fastpaths=(t,e)=>{let r={...e},n=typeof r.maxLength=="number"?Math.min(Ky,r.maxLength):Ky,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=gL[t]||t;let s=Si.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:m,START_ANCHOR:f}=Hy.globChars(s),g=r.dot?p:l,y=r.dot?d:l,v=r.capture?"":"?:",D={negated:!1,prefix:""},E=r.bash===!0?".*?":m;r.capture&&(E=`(${E})`);let x=F=>F.noglobstar===!0?E:`(${v}(?:(?!${f}${F.dot?u:o}).)*?)`,b=F=>{switch(F){case"*":return`${g}${c}${E}`;case".*":return`${o}${c}${E}`;case"*.*":return`${g}${E}${o}${c}${E}`;case"*/*":return`${g}${E}${a}${c}${y}${E}`;case"**":return g+x(r);case"**/*":return`(?:${g}${x(r)}${a})?${y}${c}${E}`;case"**/*.*":return`(?:${g}${x(r)}${a})?${y}${E}${o}${c}${E}`;case"**/.*":return`(?:${g}${x(r)}${a})?${o}${c}${E}`;default:{let P=/^(.*?)\.(\w+)$/.exec(F);if(!P)return;let A=b(P[1]);return A?A+o+P[2]:void 0}}},C=Si.removePrefix(t,D),w=b(C);return w&&r.strictSlashes!==!0&&(w+=`${a}?`),w};yL.exports=aw});var xL=S((tGe,bL)=>{"use strict";h();var Qde=require("path"),Zde=hL(),cw=vL(),uw=Jf(),efe=Wf(),tfe=t=>t&&typeof t=="object"&&!Array.isArray(t),Tr=(t,e,r=!1)=>{if(Array.isArray(t)){let l=t.map(d=>Tr(d,e,r));return d=>{for(let m of l){let f=m(d);if(f)return f}return!1}}let n=tfe(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=uw.isWindows(e),o=n?Tr.compileRe(t,e):Tr.makeRe(t,e,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};c=Tr(i.ignore,l,r)}let u=(l,p=!1)=>{let{isMatch:d,match:m,output:f}=Tr.test(l,o,e,{glob:t,posix:s}),g={glob:t,state:a,regex:o,posix:s,input:l,output:f,match:m,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(l)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,p?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),p?g:!0)};return r&&(u.state=a),u};Tr.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?uw.toPosixSlashes:null),a=t===n,c=a&&o?o(t):t;return a===!1&&(c=o?o(t):t,a=c===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Tr.matchBase(t,e,r,i):a=e.exec(c)),{isMatch:!!a,match:a,output:c}};Tr.matchBase=(t,e,r,n=uw.isWindows(r))=>(e instanceof RegExp?e:Tr.makeRe(e,r)).test(Qde.basename(t));Tr.isMatch=(t,e,r)=>Tr(e,r)(t);Tr.parse=(t,e)=>Array.isArray(t)?t.map(r=>Tr.parse(r,e)):cw(t,{...e,fastpaths:!1});Tr.scan=(t,e)=>Zde(t,e);Tr.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let c=Tr.toRegex(a,e);return n===!0&&(c.state=t),c};Tr.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=cw.fastpaths(t,e)),i.output||(i=cw(t,e)),Tr.compileRe(i,e,r,n)};Tr.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Tr.constants=efe;bL.exports=Tr});var EL=S((nGe,DL)=>{"use strict";h();DL.exports=xL()});var Wy=S((sGe,PL)=>{"use strict";h();var wL=require("util"),SL=rL(),ao=EL(),lw=Jf(),CL=t=>t===""||t==="./",TL=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},nr=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<e.length;l++){let p=ao(String(e[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let m of t){let f=p(m,!0);(d?!f.isMatch:f.isMatch)&&(d?n.add(f.output):(n.delete(f.output),i.add(f.output)))}}let u=(o===e.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return u};nr.match=nr;nr.matcher=(t,e)=>ao(t,e);nr.isMatch=(t,e,r)=>ao(e,r)(t);nr.any=nr.isMatch;nr.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(nr(t,e,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};nr.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${wL.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>nr.contains(t,n,r));if(typeof e=="string"){if(CL(t)||CL(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return nr.isMatch(t,e,{...r,contains:!0})};nr.matchKeys=(t,e,r)=>{if(!lw.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=nr(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i};nr.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=ao(String(i),r);if(n.some(o=>s(o)))return!0}return!1};nr.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=ao(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};nr.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${wL.inspect(t)}"`);return[].concat(e).every(n=>ao(n,r)(t))};nr.capture=(t,e,r)=>{let n=lw.isWindows(r),s=ao.makeRe(String(t),{...r,capture:!0}).exec(n?lw.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};nr.makeRe=(...t)=>ao.makeRe(...t);nr.scan=(...t)=>ao.scan(...t);nr.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of SL(String(n),e))r.push(ao.parse(i,e));return r};nr.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!TL(t)?[t]:SL(t,e)};nr.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return nr.braces(t,{...e,expand:!0})};nr.hasBraces=TL;PL.exports=nr});var ML=S($e=>{"use strict";h();Object.defineProperty($e,"__esModule",{value:!0});$e.isAbsolute=$e.partitionAbsoluteAndRelative=$e.removeDuplicateSlashes=$e.matchAny=$e.convertPatternsToRe=$e.makeRe=$e.getPatternParts=$e.expandBraceExpansion=$e.expandPatternsWithBraceExpansion=$e.isAffectDepthOfReadingPattern=$e.endsWithSlashGlobStar=$e.hasGlobStar=$e.getBaseDirectory=$e.isPatternRelatedToParentDirectory=$e.getPatternsOutsideCurrentDirectory=$e.getPatternsInsideCurrentDirectory=$e.getPositivePatterns=$e.getNegativePatterns=$e.isPositivePattern=$e.isNegativePattern=$e.convertToNegativePattern=$e.convertToPositivePattern=$e.isDynamicPattern=$e.isStaticPattern=void 0;var AL=require("path"),rfe=x8(),pw=Wy(),_L="**",nfe="\\",ife=/[*?]|^!/,sfe=/\[[^[]*]/,ofe=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,afe=/[!*+?@]\([^(]*\)/,cfe=/,|\.\./,ufe=/(?!^)\/{2,}/g;function FL(t,e={}){return!kL(t,e)}$e.isStaticPattern=FL;function kL(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(nfe)||ife.test(t)||sfe.test(t)||ofe.test(t)||e.extglob!==!1&&afe.test(t)||e.braceExpansion!==!1&&lfe(t))}$e.isDynamicPattern=kL;function lfe(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let n=t.slice(e,r);return cfe.test(n)}function pfe(t){return Jy(t)?t.slice(1):t}$e.convertToPositivePattern=pfe;function dfe(t){return"!"+t}$e.convertToNegativePattern=dfe;function Jy(t){return t.startsWith("!")&&t[1]!=="("}$e.isNegativePattern=Jy;function IL(t){return!Jy(t)}$e.isPositivePattern=IL;function ffe(t){return t.filter(Jy)}$e.getNegativePatterns=ffe;function mfe(t){return t.filter(IL)}$e.getPositivePatterns=mfe;function hfe(t){return t.filter(e=>!dw(e))}$e.getPatternsInsideCurrentDirectory=hfe;function gfe(t){return t.filter(dw)}$e.getPatternsOutsideCurrentDirectory=gfe;function dw(t){return t.startsWith("..")||t.startsWith("./..")}$e.isPatternRelatedToParentDirectory=dw;function yfe(t){return rfe(t,{flipBackslashes:!1})}$e.getBaseDirectory=yfe;function vfe(t){return t.includes(_L)}$e.hasGlobStar=vfe;function NL(t){return t.endsWith("/"+_L)}$e.endsWithSlashGlobStar=NL;function bfe(t){let e=AL.basename(t);return NL(t)||FL(e)}$e.isAffectDepthOfReadingPattern=bfe;function xfe(t){return t.reduce((e,r)=>e.concat(RL(r)),[])}$e.expandPatternsWithBraceExpansion=xfe;function RL(t){let e=pw.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,n)=>r.length-n.length),e.filter(r=>r!=="")}$e.expandBraceExpansion=RL;function Dfe(t,e){let{parts:r}=pw.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}$e.getPatternParts=Dfe;function OL(t,e){return pw.makeRe(t,e)}$e.makeRe=OL;function Efe(t,e){return t.map(r=>OL(r,e))}$e.convertPatternsToRe=Efe;function Cfe(t,e){return e.some(r=>r.test(t))}$e.matchAny=Cfe;function wfe(t){return t.replace(ufe,"/")}$e.removeDuplicateSlashes=wfe;function Sfe(t){let e=[],r=[];for(let n of t)BL(n)?e.push(n):r.push(n);return[e,r]}$e.partitionAbsoluteAndRelative=Sfe;function BL(t){return AL.isAbsolute(t)}$e.isAbsolute=BL});var UL=S((uGe,jL)=>{"use strict";h();var Tfe=require("stream"),LL=Tfe.PassThrough,Pfe=Array.prototype.slice;jL.exports=Afe;function Afe(){let t=[],e=Pfe.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=LL(n);function a(){for(let l=0,p=arguments.length;l<p;l++)t.push($L(arguments[l],n));return c(),this}function c(){if(r)return;r=!0;let l=t.shift();if(!l){process.nextTick(u);return}Array.isArray(l)||(l=[l]);let p=l.length+1;function d(){--p>0||(r=!1,c())}function m(f){function g(){f.removeListener("merge2UnpipeEnd",g),f.removeListener("end",g),s&&f.removeListener("error",y),d()}function y(v){o.emit("error",v)}if(f._readableState.endEmitted)return d();f.on("merge2UnpipeEnd",g),f.on("end",g),s&&f.on("error",y),f.pipe(o,{end:!1}),f.resume()}for(let f=0;f<l.length;f++)m(l[f]);d()}function u(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(l){l.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function $L(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=$L(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(LL(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var zL=S(Yy=>{"use strict";h();Object.defineProperty(Yy,"__esModule",{value:!0});Yy.merge=void 0;var _fe=UL();function Ffe(t){let e=_fe(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>qL(t)),e.once("end",()=>qL(t)),e}Yy.merge=Ffe;function qL(t){t.forEach(e=>e.emit("close"))}});var GL=S(op=>{"use strict";h();Object.defineProperty(op,"__esModule",{value:!0});op.isEmpty=op.isString=void 0;function kfe(t){return typeof t=="string"}op.isString=kfe;function Ife(t){return t===""}op.isEmpty=Ife});var Jo=S(xn=>{"use strict";h();Object.defineProperty(xn,"__esModule",{value:!0});xn.string=xn.stream=xn.pattern=xn.path=xn.fs=xn.errno=xn.array=void 0;var Nfe=a8();xn.array=Nfe;var Rfe=c8();xn.errno=Rfe;var Ofe=u8();xn.fs=Ofe;var Bfe=f8();xn.path=Bfe;var Mfe=ML();xn.pattern=Mfe;var Lfe=zL();xn.stream=Lfe;var $fe=GL();xn.string=$fe});var WL=S(Dn=>{"use strict";h();Object.defineProperty(Dn,"__esModule",{value:!0});Dn.convertPatternGroupToTask=Dn.convertPatternGroupsToTasks=Dn.groupPatternsByBaseDirectory=Dn.getNegativePatternsAsPositive=Dn.getPositivePatterns=Dn.convertPatternsToTasks=Dn.generate=void 0;var _s=Jo();function jfe(t,e){let r=VL(t,e),n=VL(e.ignore,e),i=HL(r),s=KL(r,n),o=i.filter(l=>_s.pattern.isStaticPattern(l,e)),a=i.filter(l=>_s.pattern.isDynamicPattern(l,e)),c=fw(o,s,!1),u=fw(a,s,!0);return c.concat(u)}Dn.generate=jfe;function VL(t,e){let r=t;return e.braceExpansion&&(r=_s.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>_s.pattern.removeDuplicateSlashes(n))}function fw(t,e,r){let n=[],i=_s.pattern.getPatternsOutsideCurrentDirectory(t),s=_s.pattern.getPatternsInsideCurrentDirectory(t),o=mw(i),a=mw(s);return n.push(...hw(o,e,r)),"."in a?n.push(gw(".",s,e,r)):n.push(...hw(a,e,r)),n}Dn.convertPatternsToTasks=fw;function HL(t){return _s.pattern.getPositivePatterns(t)}Dn.getPositivePatterns=HL;function KL(t,e){return _s.pattern.getNegativePatterns(t).concat(e).map(_s.pattern.convertToPositivePattern)}Dn.getNegativePatternsAsPositive=KL;function mw(t){let e={};return t.reduce((r,n)=>{let i=_s.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}Dn.groupPatternsByBaseDirectory=mw;function hw(t,e,r){return Object.keys(t).map(n=>gw(n,t[n],e,r))}Dn.convertPatternGroupsToTasks=hw;function gw(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(_s.pattern.convertToNegativePattern))}}Dn.convertPatternGroupToTask=gw});var YL=S(Xy=>{"use strict";h();Object.defineProperty(Xy,"__esModule",{value:!0});Xy.read=void 0;function Ufe(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){JL(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){yw(r,i);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){JL(r,s);return}yw(r,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),yw(r,o)})})}Xy.read=Ufe;function JL(t,e){t(e)}function yw(t,e){t(null,e)}});var XL=S(Qy=>{"use strict";h();Object.defineProperty(Qy,"__esModule",{value:!0});Qy.read=void 0;function qfe(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}Qy.read=qfe});var QL=S(Na=>{"use strict";h();Object.defineProperty(Na,"__esModule",{value:!0});Na.createFileSystemAdapter=Na.FILE_SYSTEM_ADAPTER=void 0;var Zy=require("fs");Na.FILE_SYSTEM_ADAPTER={lstat:Zy.lstat,stat:Zy.stat,lstatSync:Zy.lstatSync,statSync:Zy.statSync};function zfe(t){return t===void 0?Na.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Na.FILE_SYSTEM_ADAPTER),t)}Na.createFileSystemAdapter=zfe});var ZL=S(bw=>{"use strict";h();Object.defineProperty(bw,"__esModule",{value:!0});var Gfe=QL(),vw=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Gfe.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};bw.default=vw});var Jc=S(Ra=>{"use strict";h();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.statSync=Ra.stat=Ra.Settings=void 0;var e4=YL(),Vfe=XL(),xw=ZL();Ra.Settings=xw.default;function Hfe(t,e,r){if(typeof e=="function"){e4.read(t,Dw(),e);return}e4.read(t,Dw(e),r)}Ra.stat=Hfe;function Kfe(t,e){let r=Dw(e);return Vfe.read(t,r)}Ra.statSync=Kfe;function Dw(t={}){return t instanceof xw.default?t:new xw.default(t)}});var n4=S((_Ge,r4)=>{h();var t4;r4.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(t4||(t4=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var s4=S((kGe,i4)=>{h();i4.exports=Jfe;var Wfe=n4();function Jfe(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function o(c){function u(){e&&e(c,r),e=null}s?Wfe(u):u()}function a(c,u,l){r[c]=l,(--n===0||u)&&o(u)}n?i?i.forEach(function(c){t[c](function(u,l){a(c,u,l)})}):t.forEach(function(c,u){c(function(l,p){a(u,l,p)})}):o(null),s=!1}});var Ew=S(tv=>{"use strict";h();Object.defineProperty(tv,"__esModule",{value:!0});tv.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var ev=process.versions.node.split(".");if(ev[0]===void 0||ev[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var o4=Number.parseInt(ev[0],10),Yfe=Number.parseInt(ev[1],10),a4=10,Xfe=10,Qfe=o4>a4,Zfe=o4===a4&&Yfe>=Xfe;tv.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Qfe||Zfe});var c4=S(rv=>{"use strict";h();Object.defineProperty(rv,"__esModule",{value:!0});rv.createDirentFromStats=void 0;var Cw=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function eme(t,e){return new Cw(t,e)}rv.createDirentFromStats=eme});var ww=S(nv=>{"use strict";h();Object.defineProperty(nv,"__esModule",{value:!0});nv.fs=void 0;var tme=c4();nv.fs=tme});var Sw=S(iv=>{"use strict";h();Object.defineProperty(iv,"__esModule",{value:!0});iv.joinPathSegments=void 0;function rme(t,e,r){return t.endsWith(r)?t+e:t+r+e}iv.joinPathSegments=rme});var m4=S(Oa=>{"use strict";h();Object.defineProperty(Oa,"__esModule",{value:!0});Oa.readdir=Oa.readdirWithFileTypes=Oa.read=void 0;var nme=Jc(),u4=s4(),ime=Ew(),l4=ww(),p4=Sw();function sme(t,e,r){if(!e.stats&&ime.IS_SUPPORT_READDIR_WITH_FILE_TYPES){d4(t,e,r);return}f4(t,e,r)}Oa.read=sme;function d4(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){sv(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:p4.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Tw(r,s);return}let o=s.map(a=>ome(a,e));u4(o,(a,c)=>{if(a!==null){sv(r,a);return}Tw(r,c)})})}Oa.readdirWithFileTypes=d4;function ome(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=l4.fs.createDirentFromStats(t.name,i),r(null,t)})}}function f4(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){sv(r,n);return}let s=i.map(o=>{let a=p4.joinPathSegments(t,o,e.pathSegmentSeparator);return c=>{nme.stat(a,e.fsStatSettings,(u,l)=>{if(u!==null){c(u);return}let p={name:o,path:a,dirent:l4.fs.createDirentFromStats(o,l)};e.stats&&(p.stats=l),c(null,p)})}});u4(s,(o,a)=>{if(o!==null){sv(r,o);return}Tw(r,a)})})}Oa.readdir=f4;function sv(t,e){t(e)}function Tw(t,e){t(null,e)}});var b4=S(Ba=>{"use strict";h();Object.defineProperty(Ba,"__esModule",{value:!0});Ba.readdir=Ba.readdirWithFileTypes=Ba.read=void 0;var ame=Jc(),cme=Ew(),h4=ww(),g4=Sw();function ume(t,e){return!e.stats&&cme.IS_SUPPORT_READDIR_WITH_FILE_TYPES?y4(t,e):v4(t,e)}Ba.read=ume;function y4(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:g4.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=h4.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}Ba.readdirWithFileTypes=y4;function v4(t,e){return e.fs.readdirSync(t).map(n=>{let i=g4.joinPathSegments(t,n,e.pathSegmentSeparator),s=ame.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:h4.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}Ba.readdir=v4});var x4=S(Ma=>{"use strict";h();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.createFileSystemAdapter=Ma.FILE_SYSTEM_ADAPTER=void 0;var ap=require("fs");Ma.FILE_SYSTEM_ADAPTER={lstat:ap.lstat,stat:ap.stat,lstatSync:ap.lstatSync,statSync:ap.statSync,readdir:ap.readdir,readdirSync:ap.readdirSync};function lme(t){return t===void 0?Ma.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ma.FILE_SYSTEM_ADAPTER),t)}Ma.createFileSystemAdapter=lme});var D4=S(Aw=>{"use strict";h();Object.defineProperty(Aw,"__esModule",{value:!0});var pme=require("path"),dme=Jc(),fme=x4(),Pw=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=fme.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,pme.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new dme.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Aw.default=Pw});var ov=S(La=>{"use strict";h();Object.defineProperty(La,"__esModule",{value:!0});La.Settings=La.scandirSync=La.scandir=void 0;var E4=m4(),mme=b4(),_w=D4();La.Settings=_w.default;function hme(t,e,r){if(typeof e=="function"){E4.read(t,Fw(),e);return}E4.read(t,Fw(e),r)}La.scandir=hme;function gme(t,e){let r=Fw(e);return mme.read(t,r)}La.scandirSync=gme;function Fw(t={}){return t instanceof _w.default?t:new _w.default(t)}});var w4=S((XGe,C4)=>{"use strict";h();function yme(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}C4.exports=yme});var T4=S((ZGe,kw)=>{"use strict";h();var vme=w4();function S4(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=vme(bme),i=null,s=null,o=0,a=null,c={push:g,drain:Wi,saturated:Wi,pause:l,paused:!1,get concurrency(){return r},set concurrency(b){if(!(b>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=b,!c.paused)for(;i&&o<r;)o++,v()},running:u,resume:m,idle:f,length:p,getQueue:d,unshift:y,empty:Wi,kill:D,killAndDrain:E,error:x};return c;function u(){return o}function l(){c.paused=!0}function p(){for(var b=i,C=0;b;)b=b.next,C++;return C}function d(){for(var b=i,C=[];b;)C.push(b.value),b=b.next;return C}function m(){if(c.paused){if(c.paused=!1,i===null){o++,v();return}for(;i&&o<r;)o++,v()}}function f(){return o===0&&c.length()===0}function g(b,C){var w=n.get();w.context=t,w.release=v,w.value=b,w.callback=C||Wi,w.errorHandler=a,o>=r||c.paused?s?(s.next=w,s=w):(i=w,s=w,c.saturated()):(o++,e.call(t,w.value,w.worked))}function y(b,C){var w=n.get();w.context=t,w.release=v,w.value=b,w.callback=C||Wi,w.errorHandler=a,o>=r||c.paused?i?(w.next=i,i=w):(i=w,s=w,c.saturated()):(o++,e.call(t,w.value,w.worked))}function v(b){b&&n.release(b);var C=i;C&&o<=r?c.paused?o--:(s===i&&(s=null),i=C.next,C.next=null,e.call(t,C.value,C.worked),s===null&&c.empty()):--o===0&&c.drain()}function D(){i=null,s=null,c.drain=Wi}function E(){i=null,s=null,c.drain(),c.drain=Wi}function x(b){a=b}}function Wi(){}function bme(){this.value=null,this.callback=Wi,this.next=null,this.release=Wi,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=Wi,t.errorHandler&&s(r,o),i.call(t.context,r,n),t.release(t)}}function xme(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(l,p){e.call(this,l).then(function(d){p(null,d)},p)}var i=S4(t,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=u,i;function a(l){var p=new Promise(function(d,m){s(l,function(f,g){if(f){m(f);return}d(g)})});return p.catch(Wi),p}function c(l){var p=new Promise(function(d,m){o(l,function(f,g){if(f){m(f);return}d(g)})});return p.catch(Wi),p}function u(){var l=new Promise(function(p){process.nextTick(function(){if(i.idle())p();else{var d=i.drain;i.drain=function(){typeof d=="function"&&d(),p(),i.drain=d}}})});return l}}kw.exports=S4;kw.exports.promise=xme});var av=S(co=>{"use strict";h();Object.defineProperty(co,"__esModule",{value:!0});co.joinPathSegments=co.replacePathSegmentSeparator=co.isAppliedFilter=co.isFatalError=void 0;function Dme(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}co.isFatalError=Dme;function Eme(t,e){return t===null||t(e)}co.isAppliedFilter=Eme;function Cme(t,e){return t.split(/[/\\]/).join(e)}co.replacePathSegmentSeparator=Cme;function wme(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}co.joinPathSegments=wme});var Rw=S(Nw=>{"use strict";h();Object.defineProperty(Nw,"__esModule",{value:!0});var Sme=av(),Iw=class{constructor(e,r){this._root=e,this._settings=r,this._root=Sme.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};Nw.default=Iw});var Mw=S(Bw=>{"use strict";h();Object.defineProperty(Bw,"__esModule",{value:!0});var Tme=require("events"),Pme=ov(),Ame=T4(),cv=av(),_me=Rw(),Ow=class extends _me.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=Pme.scandir,this._emitter=new Tme.EventEmitter,this._queue=Ame(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!cv.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=cv.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),cv.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&cv.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};Bw.default=Ow});var P4=S($w=>{"use strict";h();Object.defineProperty($w,"__esModule",{value:!0});var Fme=Mw(),Lw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Fme.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{kme(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Ime(e,this._storage)}),this._reader.read()}};$w.default=Lw;function kme(t,e){t(e)}function Ime(t,e){t(null,e)}});var A4=S(Uw=>{"use strict";h();Object.defineProperty(Uw,"__esModule",{value:!0});var Nme=require("stream"),Rme=Mw(),jw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Rme.default(this._root,this._settings),this._stream=new Nme.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Uw.default=jw});var _4=S(zw=>{"use strict";h();Object.defineProperty(zw,"__esModule",{value:!0});var Ome=ov(),uv=av(),Bme=Rw(),qw=class extends Bme.default{constructor(){super(...arguments),this._scandir=Ome.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(uv.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=uv.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),uv.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&uv.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};zw.default=qw});var F4=S(Vw=>{"use strict";h();Object.defineProperty(Vw,"__esModule",{value:!0});var Mme=_4(),Gw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Mme.default(this._root,this._settings)}read(){return this._reader.read()}};Vw.default=Gw});var k4=S(Kw=>{"use strict";h();Object.defineProperty(Kw,"__esModule",{value:!0});var Lme=require("path"),$me=ov(),Hw=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Lme.sep),this.fsScandirSettings=new $me.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Kw.default=Hw});var pv=S(uo=>{"use strict";h();Object.defineProperty(uo,"__esModule",{value:!0});uo.Settings=uo.walkStream=uo.walkSync=uo.walk=void 0;var I4=P4(),jme=A4(),Ume=F4(),Ww=k4();uo.Settings=Ww.default;function qme(t,e,r){if(typeof e=="function"){new I4.default(t,lv()).read(e);return}new I4.default(t,lv(e)).read(r)}uo.walk=qme;function zme(t,e){let r=lv(e);return new Ume.default(t,r).read()}uo.walkSync=zme;function Gme(t,e){let r=lv(e);return new jme.default(t,r).read()}uo.walkStream=Gme;function lv(t={}){return t instanceof Ww.default?t:new Ww.default(t)}});var dv=S(Yw=>{"use strict";h();Object.defineProperty(Yw,"__esModule",{value:!0});var Vme=require("path"),Hme=Jc(),N4=Jo(),Jw=class{constructor(e){this._settings=e,this._fsStatSettings=new Hme.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return Vme.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:N4.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!N4.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};Yw.default=Jw});var Zw=S(Qw=>{"use strict";h();Object.defineProperty(Qw,"__esModule",{value:!0});var Kme=require("stream"),Wme=Jc(),Jme=pv(),Yme=dv(),Xw=class extends Yme.default{constructor(){super(...arguments),this._walkStream=Jme.walkStream,this._stat=Wme.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),i=new Kme.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],r).then(c=>{c!==null&&r.entryFilter(c)&&i.push(c),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};Qw.default=Xw});var R4=S(tS=>{"use strict";h();Object.defineProperty(tS,"__esModule",{value:!0});var Xme=pv(),Qme=dv(),Zme=Zw(),eS=class extends Qme.default{constructor(){super(...arguments),this._walkAsync=Xme.walk,this._readerStream=new Zme.default(this._settings)}dynamic(e,r){return new Promise((n,i)=>{this._walkAsync(e,r,(s,o)=>{s===null?n(o):i(s)})})}async static(e,r){let n=[],i=this._readerStream.static(e,r);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};tS.default=eS});var O4=S(nS=>{"use strict";h();Object.defineProperty(nS,"__esModule",{value:!0});var Xf=Jo(),rS=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:e,segments:r,sections:n})}}_getPatternSegments(e){return Xf.pattern.getPatternParts(e,this._micromatchOptions).map(n=>Xf.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Xf.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return Xf.array.splitWhen(e,r=>r.dynamic&&Xf.pattern.hasGlobStar(r.pattern))}};nS.default=rS});var B4=S(sS=>{"use strict";h();Object.defineProperty(sS,"__esModule",{value:!0});var ehe=O4(),iS=class extends ehe.default{match(e){let r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((c,u)=>{let l=s.segments[u];return!!(l.dynamic&&l.patternRe.test(c)||!l.dynamic&&l.pattern===c)}))return!0}return!1}};sS.default=iS});var M4=S(aS=>{"use strict";h();Object.defineProperty(aS,"__esModule",{value:!0});var fv=Jo(),the=B4(),oS=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new the.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(fv.pattern.isAffectDepthOfReadingPattern);return fv.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=fv.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!fv.pattern.matchAny(e,r)}};aS.default=oS});var L4=S(uS=>{"use strict";h();Object.defineProperty(uS,"__esModule",{value:!0});var $a=Jo(),cS=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let[n,i]=$a.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:$a.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:$a.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:$a.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(e,r){let n=$a.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(n,r,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,r,n){return!(!this._isMatchToPatterns(e,r.positive.all,n)||this._isMatchToPatterns(e,r.negative.relative,n)||this._isMatchToAbsoluteNegative(e,r.negative.absolute,n))}_isMatchToAbsoluteNegative(e,r,n){if(r.length===0)return!1;let i=$a.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(e,r,n){if(r.length===0)return!1;let i=$a.pattern.matchAny(e,r);return!i&&n?$a.pattern.matchAny(e+"/",r):i}};uS.default=cS});var $4=S(pS=>{"use strict";h();Object.defineProperty(pS,"__esModule",{value:!0});var rhe=Jo(),lS=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return rhe.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};pS.default=lS});var U4=S(fS=>{"use strict";h();Object.defineProperty(fS,"__esModule",{value:!0});var j4=Jo(),dS=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=j4.path.makeAbsolute(this._settings.cwd,r),r=j4.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};fS.default=dS});var mv=S(hS=>{"use strict";h();Object.defineProperty(hS,"__esModule",{value:!0});var nhe=require("path"),ihe=M4(),she=L4(),ohe=$4(),ahe=U4(),mS=class{constructor(e){this._settings=e,this.errorFilter=new ohe.default(this._settings),this.entryFilter=new she.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new ihe.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new ahe.default(this._settings)}_getRootDirectory(e){return nhe.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};hS.default=mS});var q4=S(yS=>{"use strict";h();Object.defineProperty(yS,"__esModule",{value:!0});var che=R4(),uhe=mv(),gS=class extends uhe.default{constructor(){super(...arguments),this._reader=new che.default(this._settings)}async read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(r,e,n)).map(s=>n.transform(s))}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};yS.default=gS});var z4=S(bS=>{"use strict";h();Object.defineProperty(bS,"__esModule",{value:!0});var lhe=require("stream"),phe=Zw(),dhe=mv(),vS=class extends dhe.default{constructor(){super(...arguments),this._reader=new phe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new lhe.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};bS.default=vS});var G4=S(DS=>{"use strict";h();Object.defineProperty(DS,"__esModule",{value:!0});var fhe=Jc(),mhe=pv(),hhe=dv(),xS=class extends hhe.default{constructor(){super(...arguments),this._walkSync=mhe.walkSync,this._statSync=fhe.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(e,r,n){try{let i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};DS.default=xS});var V4=S(CS=>{"use strict";h();Object.defineProperty(CS,"__esModule",{value:!0});var ghe=G4(),yhe=mv(),ES=class extends yhe.default{constructor(){super(...arguments),this._reader=new ghe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};CS.default=ES});var H4=S(up=>{"use strict";h();Object.defineProperty(up,"__esModule",{value:!0});up.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var cp=require("fs"),vhe=require("os"),bhe=Math.max(vhe.cpus().length,1);up.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:cp.lstat,lstatSync:cp.lstatSync,stat:cp.stat,statSync:cp.statSync,readdir:cp.readdir,readdirSync:cp.readdirSync};var wS=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,bhe),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},up.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};up.default=wS});var AS=S((JVe,W4)=>{"use strict";h();var K4=WL(),xhe=q4(),Dhe=z4(),Ehe=V4(),SS=H4(),Ji=Jo();async function TS(t,e){Fs(t);let r=PS(t,xhe.default,e),n=await Promise.all(r);return Ji.array.flatten(n)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(u,l){Fs(u);let p=PS(u,Ehe.default,l);return Ji.array.flatten(p)}t.sync=e;function r(u,l){Fs(u);let p=PS(u,Dhe.default,l);return Ji.stream.merge(p)}t.stream=r;function n(u,l){Fs(u);let p=[].concat(u),d=new SS.default(l);return K4.generate(p,d)}t.generateTasks=n;function i(u,l){Fs(u);let p=new SS.default(l);return Ji.pattern.isDynamicPattern(u,p)}t.isDynamicPattern=i;function s(u){return Fs(u),Ji.path.escape(u)}t.escapePath=s;function o(u){return Fs(u),Ji.path.convertPathToPattern(u)}t.convertPathToPattern=o;let a;(function(u){function l(d){return Fs(d),Ji.path.escapePosixPath(d)}u.escapePath=l;function p(d){return Fs(d),Ji.path.convertPosixPathToPattern(d)}u.convertPathToPattern=p})(a=t.posix||(t.posix={}));let c;(function(u){function l(d){return Fs(d),Ji.path.escapeWindowsPath(d)}u.escapePath=l;function p(d){return Fs(d),Ji.path.convertWindowsPathToPattern(d)}u.convertPathToPattern=p})(c=t.win32||(t.win32={}))})(TS||(TS={}));function PS(t,e,r){let n=[].concat(t),i=new SS.default(r),s=K4.generate(n,i),o=new e(i);return s.map(o.read,o)}function Fs(t){if(![].concat(t).every(n=>Ji.string.isString(n)&&!Ji.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}W4.exports=TS});async function _S(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await Y4.default[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function FS(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return J4.default[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var J4,Y4,XVe,X4,QVe,ZVe,Q4,eHe,Z4=N(()=>{h();J4=J(require("node:fs"),1),Y4=J(require("node:fs/promises"),1);XVe=_S.bind(void 0,"stat","isFile"),X4=_S.bind(void 0,"stat","isDirectory"),QVe=_S.bind(void 0,"lstat","isSymbolicLink"),ZVe=FS.bind(void 0,"statSync","isFile"),Q4=FS.bind(void 0,"statSync","isDirectory"),eHe=FS.bind(void 0,"lstatSync","isSymbolicLink")});var e6=N(()=>{h()});function Qf(t){return t instanceof URL?(0,r6.fileURLToPath)(t):t}var t6,kS,r6,sHe,oHe,IS=N(()=>{h();t6=require("node:util"),kS=require("node:child_process"),r6=require("node:url");e6();sHe=(0,t6.promisify)(kS.execFile);oHe=10*1024*1024});function lp(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}var n6=N(()=>{h()});var Zf,NS=N(()=>{h();Zf=t=>t[0]==="!"});var i6,s6,o6,Yc,RS,a6,Che,c6,u6,whe,She,The,l6,p6,d6,f6,m6=N(()=>{h();i6=J(require("node:process"),1),s6=J(require("node:fs"),1),o6=J(require("node:fs/promises"),1),Yc=J(require("node:path"),1),RS=J(AS(),1),a6=J(require("ignore"),1);n6();IS();NS();Che=["**/node_modules","**/flow-typed","**/coverage","**/.git"],c6={absolute:!0,dot:!0},u6="**/.gitignore",whe=(t,e)=>Zf(t)?"!"+Yc.default.posix.join(e,t.slice(1)):Yc.default.posix.join(e,t),She=(t,e)=>{let r=lp(Yc.default.relative(e,Yc.default.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>whe(n,r))},The=(t,e)=>{if(e=lp(e),Yc.default.isAbsolute(t)){if(lp(t).startsWith(e))return Yc.default.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},l6=(t,e)=>{let r=t.flatMap(i=>She(i,e)),n=(0,a6.default)().add(r);return i=>(i=Qf(i),i=The(i,e),i?n.ignores(lp(i)):!1)},p6=(t={})=>({cwd:Qf(t.cwd)??i6.default.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY,ignore:[...t.ignore??[],...Che]}),d6=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=p6(e),o=await(0,RS.default)(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...c6}),a=await Promise.all(o.map(async c=>({filePath:c,content:await o6.default.readFile(c,"utf8")})));return l6(a,r)},f6=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=p6(e),a=RS.default.sync(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...c6}).map(c=>({filePath:c,content:s6.default.readFileSync(c,"utf8")}));return l6(a,r)}});var OS,y6,Xc,pp,Phe,v6,b6,h6,g6,BS,Ahe,x6,D6,hv,E6,_he,C6,w6,S6,T6,P6,A6,MS,LS,wHe,SHe,THe,PHe,AHe,_He,_6=N(()=>{h();OS=J(require("node:process"),1),y6=J(require("node:fs"),1),Xc=J(require("node:path"),1);o8();pp=J(AS(),1);Z4();IS();m6();NS();Phe=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},v6=(t,e)=>{let r=Zf(t)?t.slice(1):t;return Xc.default.isAbsolute(r)?r:Xc.default.join(e,r)},b6=({directoryPath:t,files:e,extensions:r})=>{let n=r?.length>0?`.${r.length>1?`{${r.join(",")}}`:r[0]}`:"";return e?e.map(i=>Xc.default.posix.join(t,`**/${Xc.default.extname(i)?i:`${i}${n}`}`)):[Xc.default.posix.join(t,`**${n?`/*${n}`:""}`)]},h6=async(t,{cwd:e=OS.default.cwd(),files:r,extensions:n}={})=>(await Promise.all(t.map(async s=>await X4(v6(s,e))?b6({directoryPath:s,files:r,extensions:n}):s))).flat(),g6=(t,{cwd:e=OS.default.cwd(),files:r,extensions:n}={})=>t.flatMap(i=>Q4(v6(i,e))?b6({directoryPath:i,files:r,extensions:n}):i),BS=t=>(t=[...new Set([t].flat())],Phe(t),t),Ahe=t=>{if(!t)return;let e;try{e=y6.default.statSync(t)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},x6=(t={})=>(t={...t,ignore:t.ignore??[],expandDirectories:t.expandDirectories??!0,cwd:Qf(t.cwd)},Ahe(t.cwd),t),D6=t=>async(e,r)=>t(BS(e),x6(r)),hv=t=>(e,r)=>t(BS(e),x6(r)),E6=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?BS(e):[];return r&&n.push(u6),n},_he=async t=>{let e=E6(t);return w6(e.length>0&&await d6(e,t))},C6=t=>{let e=E6(t);return w6(e.length>0&&f6(e,t))},w6=t=>{let e=new Set;return r=>{let n=Xc.default.normalize(r.path??r);return e.has(n)||t&&t(n)?!1:(e.add(n),!0)}},S6=(t,e)=>t.flat().filter(r=>e(r)),T6=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(s=>Zf(s));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let s of r)s.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},P6=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),A6=async(t,e)=>{let r=T6(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=P6(i,n);return Promise.all(r.map(async o=>{let{patterns:a,options:c}=o;return[a,c.ignore]=await Promise.all([h6(a,s),h6(c.ignore,{cwd:n})]),{patterns:a,options:c}}))},MS=(t,e)=>{let r=T6(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=P6(i,n);return r.map(o=>{let{patterns:a,options:c}=o;return a=g6(a,s),c.ignore=g6(c.ignore,{cwd:n}),{patterns:a,options:c}})},LS=D6(async(t,e)=>{let[r,n]=await Promise.all([A6(t,e),_he(e)]),i=await Promise.all(r.map(s=>(0,pp.default)(s.patterns,s.options)));return S6(i,n)}),wHe=hv((t,e)=>{let r=MS(t,e),n=C6(e),i=r.map(s=>pp.default.sync(s.patterns,s.options));return S6(i,n)}),SHe=hv((t,e)=>{let r=MS(t,e),n=C6(e),i=r.map(o=>pp.default.stream(o.patterns,o.options));return GC(i).filter(o=>n(o))}),THe=hv((t,e)=>t.some(r=>pp.default.isDynamicPattern(r,e))),PHe=D6(A6),AHe=hv(MS),{convertPathToPattern:_He}=pp.default});function dp(t){let e=Date.now();return new Promise((r,n)=>{let s=Fhe(t.url)({protocol:t.url.protocol,host:t.url.host,port:t.url.port,path:t.url.pathname+t.url.search,method:t.method,headers:t.headers},o=>{let a="";o.on("data",c=>{a+=c}),o.on("end",()=>{if((0,F6.debug)(`${t.method} ${t.url.href}, duration: ${Date.now()-e}ms`),typeof o.statusCode=="number"&&o.statusCode>=200&&o.statusCode<300)if(typeof o.headers["content-type"]!="string"||!o.headers["content-type"].includes("application/json"))n(`Response from ${t.url.href} content-type is ${o.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(c){n(`Response from ${t.url.href} is not valid JSON: ${a}
|
|
1230
|
+
`);return s}function K8(t){return t.inputs.map(e=>` ${npe(e.name)}?: ${Qle(e)};${e.ref?` // when "${e.ref}" is true`:""}`).join(`
|
|
1231
|
+
`)}function Vf(t,e){let r=t?.document??t?.documents[0];if(!r)throw new Error("No document found");let{inputs:n,nameMap:i}=tpe(r),s=a=>{if(!a)return null;let c=t?.componentSets?.[a];if(c)return c.name;let u=t?.components?.[a];return u&&u.componentSetId?s(u.componentSetId):u.name};return{type:r.type,name:r.name,jsx:r.type==="COMPONENT_SET"&&r.children.length>0?$C(r.children[0],i,s):$C(r,i,s),inputs:n,key:r.key,description:r.description,documentationLinks:r.documentationLinks?.map(a=>a.uri)||[],instanceId:e?.includes(":")?e:r.id,documentName:"",tree:""}}function V8(t){return typeof t=="string"?t.replace(/#\d+:\d+$/,"").replace(H8,"").trim():""}function Zle(t){let e=new Map,r=new Map;return t.forEach(n=>{let i=V8(n);r.has(i)?(e.has(n)&&(e.set(r.get(i),r.get(i)),e.delete(i)),e.set(n,n)):(e.set(n,i),r.set(i,n))}),n=>{let i=e.get(n)??V8(n);if(!i)throw new Error("No value for key "+n);return i}}function epe(t,e){let r=[],n=[t];for(;n.length>0;){let i=n.shift();i&&(e(i)&&r.push(i),"children"in i&&n.push(...i.children))}return r}function tpe(t){let e=[],r={};try{r=t.componentPropertyDefinitions||{}}catch(c){console.error("Invalid Component Property Definitions",c)}let n=t.type==="COMPONENT_SET"?t.children:[t],i=new Map,s=[],o=Object.keys(r),a=Zle(o);for(let c of n){let u=epe(c,l=>l.type==="INSTANCE"||l.type==="TEXT");for(let l of u){s.push(l);let p=l.componentPropertyReferences;p&&p.visible&&(p.characters&&i.set(p.characters,a(p.visible)),p.mainComponent&&i.set(p.mainComponent,a(p.visible)))}}for(let c of o){let u=r[c];switch(u.type){case"TEXT":{e.push({id:c,name:a(c),value:u.defaultValue,type:"string",baseType:"text",isDefault:!0,ref:i.get(c)});break}case"BOOLEAN":{e.push({id:c,name:a(c),value:!!u.defaultValue,baseType:"boolean",isDefault:!0,type:"boolean"});break}case"VARIANT":{e.push({id:c,name:a(c),value:u.defaultValue,type:u.variantOptions?.map(l=>`'${l}'`).join(" | ")??"string",baseType:"variant",variantOptions:u.variantOptions??[],isDefault:!0,ref:i.get(c)});break}case"INSTANCE_SWAP":{e.push({id:c,name:a(c),value:String(u.defaultValue),type:"React.ReactNode",baseType:"slot",isDefault:!0,ref:i.get(c)});break}}}return{inputs:e,nameMap:a}}function rpe(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}var H8,Qle,npe,Hc=N(()=>{"use strict";h();H8=/[^\x00-\x7F]/g;Qle=t=>t.type==="reference"?"ReactNode":t.type==="file"||t.type==="richText"?"string":t.type;npe=t=>/^[a-zA-Z_\$]\w*$/.test(t)?t:JSON.stringify(t)});async function Y8(t,e,r){let n=JSON.stringify({token:e}),i=new URL(`${tt}/mappings/figma-components/get`);t.builderPublicKey&&i.searchParams.set("apiKey",t.builderPublicKey),t.userId&&i.searchParams.set("userId",t.userId);let s={"Content-Type":"application/json"};t.builderPrivateKey&&(s.Authorization=`Bearer ${t.builderPrivateKey}`);let o=await ze(i,{method:"POST",body:n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`}});if(!o.ok)throw new Error(`Failed to generate completion:
|
|
1232
|
+
`+await o.text());let a=await o.json();if(!Array.isArray(a.figmaComponents))throw new Error("Invalid response from Figma API");return a.figmaComponents.map(c=>["",c])}function X8(t){return t.some(e=>!!Hf(e))}async function Q8(t,e,r,n,i){return(await Promise.all(i.map(async o=>{let a,c;if(o.match(spe))try{if(r){let p;try{p=await so(t,e,`components/${o}`,{auth:r}),a=p.meta.file_key,c=p.meta.node_id}catch{R.warning("Failed to fetch component from Figma API.")}}}catch(p){throw W8.captureException(p),p}if(!a||!c){let p=Hf(o);if(!p)return ke(`Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection.
|
|
1233
|
+
Or make sure the command is copied correctly from the Figma plugin and the same builder space is being used.`),await be(1);p&&({fileID:a,nodeId:c}=p)}if(!r)return[];let u=await J8(t,e,r,a,c),l=await ope(u[c],c);return l?[[o,l]]:[]}))).flat().filter(cpe)}async function ope(t,e){let r=t.document;if(r.type!=="COMPONENT"&&r.type!=="COMPONENT_SET"){let i=`Seems like the pasted URL points to a ${r.type} node, not a COMPONENT or COMPONENT_SET.`;return r.type==="INSTANCE"&&(i+=`
|
|
1234
|
+
Double click and select "Go to main component", then copy the URL to the figma COMPONENT`),ke(i),await be(1)}let n=t.components[e]?.key??t.componentSets[e]?.key;return n?(t.document.key=n,Vf(t,e)):(ke("Pasted URL does not correspond to a component or component set"),await be(1))}async function Oy(t,e,r,n,i){if(i.length>0){let s=await ape(t,e,r,i);for(let o of n)if(o.figmaUrl&&!o.figmaKey){let a=s[o.figmaUrl];a&&(o.figmaKey=a)}}}function cpe(t){return t!=null}var W8,Hf,ipe,so,J8,spe,ape,By=N(()=>{"use strict";h();$t();Kr();zi();W8=J(require("@sentry/node"),1);In();an();Hc();Hf=t=>{try{let e=t.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\=/g,"=").replace(/\\\?/g,"?").replace(/\\\&/g,"&"),r=new URL(e);if(!r.hostname.includes("figma.com"))return console.log(`
|
|
1235
|
+
\u274C Not a Figma URL - hostname check failed`),null;let n=r.searchParams.get("node-id")?.replaceAll("-",":"),i=r.pathname.split("/")[2];return n&&i?{fileID:i,nodeId:n}:null}catch{return null}},ipe="https://api.figma.com/v1/",so=async(t,e,r,{auth:n,params:i})=>{let s=new URL(`${ipe}${r}`),o={};if(n.oauth?o.Authorization=`Bearer ${n.access_token}`:o["X-FIGMA-TOKEN"]=n.access_token,i)for(let c in i)i[c]!=null&&s.searchParams.set(c,i[c].toString());let a=await ze(s,{headers:o});if(!a.ok){if(a.status===401){R.error("Seems like figma auth is expired or it's invalid, let's try to");let c=await zt(t,e,{force:!0,requireFigmaAuth:"always"});return so(t,e,r,{auth:c.figmaAuth,params:i})}throw new Error(`Figma REST ${a.statusText}: ${await a.text()}`)}return a.json()},J8=async(t,e,r,n,i,s)=>(await so(t,e,`files/${n}/nodes`,{auth:r,params:{ids:i,depth:s}})).nodes,spe=/^[a-f0-9]{40}$/;ape=async(t,e,r,n)=>{if(!r)return{};let i=new Map,s={};return n.forEach(o=>{let a=Hf(o);if(!a){t.Sentry?.captureException(new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection"),{extra:{figmaUrl:o},level:"warning"});return}let c=i.get(a.fileID);c||(c=[],i.set(a.fileID,c)),c.includes(a.nodeId)||c.push(a.nodeId),s[o]=`${a.fileID}/${a.nodeId}`}),await Promise.all(Array.from(i.entries()).map(async([o,a])=>{let c=await J8(t,e,r,o,a.join(","),0);for(let u of a){let l=c[u],p=l.components[u]?.key??l.componentSets[u]?.key;p||t.Sentry?.withScope(m=>{m.addAttachment({data:JSON.stringify(c,null,2),filename:`${o}.json`}),t.Sentry?.captureException(new Error("Cannot resolve figma component key for NodeID"),{extra:{nodeId:u,fileID:o},level:"warning"})});let d=`${o}/${u}`;for(let m of n)s[m]===d&&(s[m]=p)}})),s}});function GC(t){if(!Array.isArray(t))throw new TypeError(`Expected an array, got \`${typeof t}\`.`);for(let i of t)UC(i);let e=t.some(({readableObjectMode:i})=>i),r=upe(t,e),n=new jC({objectMode:e,writableHighWaterMark:r,readableHighWaterMark:r});for(let i of t)n.add(i);return t.length===0&&i3(n),n}var Ly,t3,zC,upe,jC,lpe,ppe,dpe,UC,fpe,r3,mpe,hpe,gpe,n3,i3,qC,s3,ype,My,Z8,e3,o3=N(()=>{h();Ly=require("node:events"),t3=require("node:stream"),zC=require("node:stream/promises");upe=(t,e)=>{if(t.length===0)return 16384;let r=t.filter(({readableObjectMode:n})=>n===e).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},jC=class extends t3.PassThrough{#l=new Set([]);#g=new Set([]);#E=new Set([]);#c;add(e){UC(e),!this.#l.has(e)&&(this.#l.add(e),this.#c??=lpe(this,this.#l),fpe({passThroughStream:this,stream:e,streams:this.#l,ended:this.#g,aborted:this.#E,onFinished:this.#c}),e.pipe(this,{end:!1}))}remove(e){return UC(e),this.#l.has(e)?(e.unpipe(this),!0):!1}},lpe=async(t,e)=>{My(t,Z8);let r=new AbortController;try{await Promise.race([ppe(t,r),dpe(t,e,r)])}finally{r.abort(),My(t,-Z8)}},ppe=async(t,{signal:e})=>{await(0,zC.finished)(t,{signal:e,cleanup:!0})},dpe=async(t,e,{signal:r})=>{for await(let[n]of(0,Ly.on)(t,"unpipe",{signal:r}))e.has(n)&&n.emit(n3)},UC=t=>{if(typeof t?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof t}\`.`)},fpe=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,onFinished:s})=>{My(t,e3);let o=new AbortController;try{await Promise.race([mpe(s,e),hpe({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:o}),gpe({stream:e,streams:r,ended:n,aborted:i,controller:o})])}finally{o.abort(),My(t,-e3)}r.size===n.size+i.size&&(n.size===0&&i.size>0?qC(t):i3(t))},r3=t=>t?.code==="ERR_STREAM_PREMATURE_CLOSE",mpe=async(t,e)=>{try{await t,qC(e)}catch(r){r3(r)?qC(e):s3(e,r)}},hpe=async({passThroughStream:t,stream:e,streams:r,ended:n,aborted:i,controller:{signal:s}})=>{try{await(0,zC.finished)(e,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(e)&&n.add(e)}catch(o){if(s.aborted||!r.has(e))return;r3(o)?i.add(e):s3(t,o)}},gpe=async({stream:t,streams:e,ended:r,aborted:n,controller:{signal:i}})=>{await(0,Ly.once)(t,n3,{signal:i}),e.delete(t),r.delete(t),n.delete(t)},n3=Symbol("unpipe"),i3=t=>{t.writable&&t.end()},qC=t=>{(t.readable||t.writable)&&t.destroy()},s3=(t,e)=>{t.destroyed||(t.once("error",ype),t.destroy(e))},ype=()=>{},My=(t,e)=>{let r=t.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&t.setMaxListeners(r+e)},Z8=2,e3=1});var a3=S(np=>{"use strict";h();Object.defineProperty(np,"__esModule",{value:!0});np.splitWhen=np.flatten=void 0;function vpe(t){return t.reduce((e,r)=>[].concat(e,r),[])}np.flatten=vpe;function bpe(t,e){let r=[[]],n=0;for(let i of t)e(i)?(n++,r[n]=[]):r[n].push(i);return r}np.splitWhen=bpe});var c3=S($y=>{"use strict";h();Object.defineProperty($y,"__esModule",{value:!0});$y.isEnoentCodeError=void 0;function xpe(t){return t.code==="ENOENT"}$y.isEnoentCodeError=xpe});var u3=S(jy=>{"use strict";h();Object.defineProperty(jy,"__esModule",{value:!0});jy.createDirentFromStats=void 0;var VC=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Dpe(t,e){return new VC(t,e)}jy.createDirentFromStats=Dpe});var f3=S(Rr=>{"use strict";h();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.convertPosixPathToPattern=Rr.convertWindowsPathToPattern=Rr.convertPathToPattern=Rr.escapePosixPath=Rr.escapeWindowsPath=Rr.escape=Rr.removeLeadingDotSegment=Rr.makeAbsolute=Rr.unixify=void 0;var Epe=require("os"),Cpe=require("path"),l3=Epe.platform()==="win32",wpe=2,Spe=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Tpe=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Ppe=/^\\\\([.?])/,Ape=/\\(?![!()+@[\]{}])/g;function _pe(t){return t.replace(/\\/g,"/")}Rr.unixify=_pe;function Fpe(t,e){return Cpe.resolve(t,e)}Rr.makeAbsolute=Fpe;function kpe(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(wpe)}return t}Rr.removeLeadingDotSegment=kpe;Rr.escape=l3?HC:KC;function HC(t){return t.replace(Tpe,"\\$2")}Rr.escapeWindowsPath=HC;function KC(t){return t.replace(Spe,"\\$2")}Rr.escapePosixPath=KC;Rr.convertPathToPattern=l3?p3:d3;function p3(t){return HC(t).replace(Ppe,"//$1").replace(Ape,"/")}Rr.convertWindowsPathToPattern=p3;function d3(t){return KC(t)}Rr.convertPosixPathToPattern=d3});var h3=S((Dze,m3)=>{h();m3.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var v3=S((Cze,y3)=>{h();var Ipe=h3(),g3={"{":"}","(":")","[":"]"},Npe=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,n=-2,i=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||n!==-1&&t[e]==="["&&t[e+1]!=="]"&&(n<e&&(n=t.indexOf("]",e)),n>e&&(o===-1||o>n||(o=t.indexOf("\\",e),o===-1||o>n)))||i!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(i=t.indexOf("}",e),i>e&&(o=t.indexOf("\\",e),o===-1||o>i))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var c=g3[a];if(c){var u=t.indexOf(c,e);u!==-1&&(e=u+1)}if(t[e]==="!")return!0}else e++}return!1},Rpe=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var n=g3[r];if(n){var i=t.indexOf(n,e);i!==-1&&(e=i+1)}if(t[e]==="!")return!0}else e++}return!1};y3.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(Ipe(e))return!0;var n=Npe;return r&&r.strict===!1&&(n=Rpe),n(e)}});var x3=S((Sze,b3)=>{"use strict";h();var Ope=v3(),Bpe=require("path").posix.dirname,Mpe=require("os").platform()==="win32",WC="/",Lpe=/\\/g,$pe=/[\{\[].*[\}\]]$/,jpe=/(^|[^\\])([\{\[]|\([^\)]+$)/,Upe=/\\([\!\*\?\|\[\]\(\)\{\}])/g;b3.exports=function(e,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Mpe&&e.indexOf(WC)<0&&(e=e.replace(Lpe,WC)),$pe.test(e)&&(e+=WC),e+="a";do e=Bpe(e);while(Ope(e)||jpe.test(e));return e.replace(Upe,"$1")}});var Uy=S(Ki=>{"use strict";h();Ki.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Ki.find=(t,e)=>t.nodes.find(r=>r.type===e);Ki.exceedsLimit=(t,e,r=1,n)=>n===!1||!Ki.isInteger(t)||!Ki.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=n;Ki.escapeNode=(t,e=0,r)=>{let n=t.nodes[e];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};Ki.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;Ki.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Ki.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Ki.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Ki.flatten=(...t)=>{let e=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){r(s);continue}s!==void 0&&e.push(s)}return e};return r(t),e}});var qy=S((_ze,E3)=>{"use strict";h();var D3=Uy();E3.exports=(t,e={})=>{let r=(n,i={})=>{let s=e.escapeInvalid&&D3.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(s||o)&&D3.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(t)}});var w3=S((kze,C3)=>{"use strict";h();C3.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var N3=S((Nze,I3)=>{"use strict";h();var S3=w3(),Kc=(t,e,r)=>{if(S3(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(S3(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),c=t+":"+e+"="+i+s+o+a;if(Kc.cache.hasOwnProperty(c))return Kc.cache[c].result;let u=Math.min(t,e),l=Math.max(t,e);if(Math.abs(u-l)===1){let g=t+"|"+e;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let p=k3(t)||k3(e),d={min:t,max:e,a:u,b:l},m=[],f=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){let g=l<0?Math.abs(l):1;f=T3(g,Math.abs(u),d,n),u=d.a=0}return l>=0&&(m=T3(u,l,d,n)),d.negatives=f,d.positives=m,d.result=qpe(f,m,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&m.length+f.length>1&&(d.result=`(?:${d.result})`),Kc.cache[c]=d,d.result};function qpe(t,e,r){let n=JC(t,e,"-",!1,r)||[],i=JC(e,t,"",!1,r)||[],s=JC(t,e,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function zpe(t,e){let r=1,n=1,i=A3(t,r),s=new Set([e]);for(;t<=i&&i<=e;)s.add(i),r+=1,i=A3(t,r);for(i=_3(e+1,n)-1;t<i&&i<=e;)s.add(i),n+=1,i=_3(e+1,n)-1;return s=[...s],s.sort(Hpe),s}function Gpe(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let n=Vpe(t,e),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[c,u]=n[a];c===u?s+=c:c!=="0"||u!=="9"?s+=Kpe(c,u,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function T3(t,e,r,n){let i=zpe(t,e),s=[],o=t,a;for(let c=0;c<i.length;c++){let u=i[c],l=Gpe(String(o),String(u),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+F3(a.count),o=u+1;continue}r.isPadded&&(p=Wpe(u,r,n)),l.string=p+l.pattern+F3(l.count),s.push(l),o=u+1,a=l}return s}function JC(t,e,r,n,i){let s=[];for(let o of t){let{string:a}=o;!n&&!P3(e,"string",a)&&s.push(r+a),n&&P3(e,"string",a)&&s.push(r+a)}return s}function Vpe(t,e){let r=[];for(let n=0;n<t.length;n++)r.push([t[n],e[n]]);return r}function Hpe(t,e){return t>e?1:e>t?-1:0}function P3(t,e,r){return t.some(n=>n[e]===r)}function A3(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function _3(t,e){return t-t%Math.pow(10,e)}function F3(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function Kpe(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function k3(t){return/^-?(0+)\d/.test(t)}function Wpe(t,e,r){if(!e.isPadded)return t;let n=Math.abs(e.maxLen-String(t).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}Kc.cache={};Kc.clearCache=()=>Kc.cache={};I3.exports=Kc});var QC=S((Oze,j3)=>{"use strict";h();var Jpe=require("util"),O3=N3(),R3=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),Ype=t=>e=>t===!0?Number(e):String(e),YC=t=>typeof t=="number"||typeof t=="string"&&t!=="",Kf=t=>Number.isInteger(+t),XC=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Xpe=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,Qpe=(t,e,r)=>{if(e>0){let n=t[0]==="-"?"-":"";n&&(t=t.slice(1)),t=n+t.padStart(n?e-1:e,"0")}return r===!1?String(t):t},Gy=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},Zpe=(t,e,r)=>{t.negatives.sort((a,c)=>a<c?-1:a>c?1:0),t.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=e.capture?"":"?:",i="",s="",o;return t.positives.length&&(i=t.positives.map(a=>Gy(String(a),r)).join("|")),t.negatives.length&&(s=`-(${n}${t.negatives.map(a=>Gy(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,e.wrap?`(${n}${o})`:o},B3=(t,e,r,n)=>{if(r)return O3(t,e,{wrap:!1,...n});let i=String.fromCharCode(t);if(t===e)return i;let s=String.fromCharCode(e);return`[${i}-${s}]`},M3=(t,e,r)=>{if(Array.isArray(t)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${t.join("|")})`:t.join("|")}return O3(t,e,r)},L3=(...t)=>new RangeError("Invalid range arguments: "+Jpe.inspect(...t)),$3=(t,e,r)=>{if(r.strictRanges===!0)throw L3([t,e]);return[]},ede=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},tde=(t,e,r=1,n={})=>{let i=Number(t),s=Number(e);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw L3([t,e]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(t),c=String(e),u=String(r);r=Math.max(Math.abs(r),1);let l=XC(a)||XC(c)||XC(u),p=l?Math.max(a.length,c.length,u.length):0,d=l===!1&&Xpe(t,e,n)===!1,m=n.transform||Ype(d);if(n.toRegex&&r===1)return B3(Gy(t,p),Gy(e,p),!0,n);let f={negatives:[],positives:[]},g=D=>f[D<0?"negatives":"positives"].push(Math.abs(D)),y=[],v=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?g(i):y.push(Qpe(m(i,v),p,d)),i=o?i-r:i+r,v++;return n.toRegex===!0?r>1?Zpe(f,n,p):M3(y,null,{wrap:!1,...n}):y},rde=(t,e,r=1,n={})=>{if(!Kf(t)&&t.length>1||!Kf(e)&&e.length>1)return $3(t,e,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,c=Math.min(s,o),u=Math.max(s,o);if(n.toRegex&&r===1)return B3(c,u,!1,n);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?M3(l,null,{wrap:!1,options:n}):l},zy=(t,e,r,n={})=>{if(e==null&&YC(t))return[t];if(!YC(t)||!YC(e))return $3(t,e,n);if(typeof r=="function")return zy(t,e,1,{transform:r});if(R3(r))return zy(t,e,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,Kf(r)?Kf(t)&&Kf(e)?tde(t,e,r,i):rde(t,e,Math.max(Math.abs(r),1),i):r!=null&&!R3(r)?ede(r,i):zy(t,e,1,r)};j3.exports=zy});var z3=S((Mze,q3)=>{"use strict";h();var nde=QC(),U3=Uy(),ide=(t,e={})=>{let r=(n,i={})=>{let s=U3.isInvalidBrace(i),o=n.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,c=e.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=U3.reduce(n.nodes),p=nde(...l,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)u+=r(l,n);return u};return r(t)};q3.exports=ide});var H3=S(($ze,V3)=>{"use strict";h();var sde=QC(),G3=qy(),ip=Uy(),Wc=(t="",e="",r=!1)=>{let n=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?ip.flatten(e).map(i=>`{${i}}`):e;for(let i of t)if(Array.isArray(i))for(let s of i)n.push(Wc(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?Wc(i,s,r):i+s);return ip.flatten(n)},ode=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(Wc(a.pop(),G3(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(Wc(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=ip.reduce(i.nodes);if(ip.exceedsLimit(...p,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=sde(...p,e);d.length===0&&(d=G3(i,e)),a.push(Wc(a.pop(),d)),i.nodes=[];return}let c=ip.encloseBrace(i),u=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,u=l.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&u.push(""),u.push("");continue}if(d.type==="close"){a.push(Wc(a.pop(),u,c));continue}if(d.value&&d.type!=="open"){u.push(Wc(u.pop(),d.value));continue}d.nodes&&n(d,i)}return u};return ip.flatten(n(t))};V3.exports=ode});var W3=S((Uze,K3)=>{"use strict";h();K3.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
1236
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Z3=S((zze,Q3)=>{"use strict";h();var ade=qy(),{MAX_LENGTH:J3,CHAR_BACKSLASH:ZC,CHAR_BACKTICK:cde,CHAR_COMMA:ude,CHAR_DOT:lde,CHAR_LEFT_PARENTHESES:pde,CHAR_RIGHT_PARENTHESES:dde,CHAR_LEFT_CURLY_BRACE:fde,CHAR_RIGHT_CURLY_BRACE:mde,CHAR_LEFT_SQUARE_BRACKET:Y3,CHAR_RIGHT_SQUARE_BRACKET:X3,CHAR_DOUBLE_QUOTE:hde,CHAR_SINGLE_QUOTE:gde,CHAR_NO_BREAK_SPACE:yde,CHAR_ZERO_WIDTH_NOBREAK_SPACE:vde}=W3(),bde=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min(J3,r.maxLength):J3;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],o=i,a=i,c=0,u=t.length,l=0,p=0,d,m=()=>t[l++],f=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(f({type:"bos"});l<u;)if(o=s[s.length-1],d=m(),!(d===vde||d===yde)){if(d===ZC){f({type:"text",value:(e.keepEscaping?d:"")+m()});continue}if(d===X3){f({type:"text",value:"\\"+d});continue}if(d===Y3){c++;let g;for(;l<u&&(g=m());){if(d+=g,g===Y3){c++;continue}if(g===ZC){d+=m();continue}if(g===X3&&(c--,c===0))break}f({type:"text",value:d});continue}if(d===pde){o=f({type:"paren",nodes:[]}),s.push(o),f({type:"text",value:d});continue}if(d===dde){if(o.type!=="paren"){f({type:"text",value:d});continue}o=s.pop(),f({type:"text",value:d}),o=s[s.length-1];continue}if(d===hde||d===gde||d===cde){let g=d,y;for(e.keepQuotes!==!0&&(d="");l<u&&(y=m());){if(y===ZC){d+=y+m();continue}if(y===g){e.keepQuotes===!0&&(d+=y);break}d+=y}f({type:"text",value:d});continue}if(d===fde){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=f(y),s.push(o),f({type:"open",value:d});continue}if(d===mde){if(o.type!=="brace"){f({type:"text",value:d});continue}let g="close";o=s.pop(),o.close=!0,f({type:g,value:d}),p--,o=s[s.length-1];continue}if(d===ude&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:ade(o)}]}f({type:"comma",value:d}),o.commas++;continue}if(d===lde&&p>0&&o.commas===0){let g=o.nodes;if(p===0||g.length===0){f({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let y=g[g.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}f({type:"dot",value:d});continue}f({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(v=>{v.nodes||(v.type==="open"&&(v.isOpen=!0),v.type==="close"&&(v.isClose=!0),v.nodes||(v.type="text"),v.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(o);g.nodes.splice(y,1,...o.nodes)}while(s.length>0);return f({type:"eos"}),i};Q3.exports=bde});var rL=S((Vze,tL)=>{"use strict";h();var eL=qy(),xde=z3(),Dde=H3(),Ede=Z3(),wi=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=wi.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(wi.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};wi.parse=(t,e={})=>Ede(t,e);wi.stringify=(t,e={})=>eL(typeof t=="string"?wi.parse(t,e):t,e);wi.compile=(t,e={})=>(typeof t=="string"&&(t=wi.parse(t,e)),xde(t,e));wi.expand=(t,e={})=>{typeof t=="string"&&(t=wi.parse(t,e));let r=Dde(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};wi.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?wi.compile(t,e):wi.expand(t,e);tL.exports=wi});var Wf=S((Kze,aL)=>{"use strict";h();var Cde=require("path"),oo="\\\\/",nL=`[^${oo}]`,Wo="\\.",wde="\\+",Sde="\\?",Vy="\\/",Tde="(?=.)",iL="[^/]",ew=`(?:${Vy}|$)`,sL=`(?:^|${Vy})`,tw=`${Wo}{1,2}${ew}`,Pde=`(?!${Wo})`,Ade=`(?!${sL}${tw})`,_de=`(?!${Wo}{0,1}${ew})`,Fde=`(?!${tw})`,kde=`[^.${Vy}]`,Ide=`${iL}*?`,oL={DOT_LITERAL:Wo,PLUS_LITERAL:wde,QMARK_LITERAL:Sde,SLASH_LITERAL:Vy,ONE_CHAR:Tde,QMARK:iL,END_ANCHOR:ew,DOTS_SLASH:tw,NO_DOT:Pde,NO_DOTS:Ade,NO_DOT_SLASH:_de,NO_DOTS_SLASH:Fde,QMARK_NO_DOT:kde,STAR:Ide,START_ANCHOR:sL},Nde={...oL,SLASH_LITERAL:`[${oo}]`,QMARK:nL,STAR:`${nL}*?`,DOTS_SLASH:`${Wo}{1,2}(?:[${oo}]|$)`,NO_DOT:`(?!${Wo})`,NO_DOTS:`(?!(?:^|[${oo}])${Wo}{1,2}(?:[${oo}]|$))`,NO_DOT_SLASH:`(?!${Wo}{0,1}(?:[${oo}]|$))`,NO_DOTS_SLASH:`(?!${Wo}{1,2}(?:[${oo}]|$))`,QMARK_NO_DOT:`[^.${oo}]`,START_ANCHOR:`(?:^|[${oo}])`,END_ANCHOR:`(?:[${oo}]|$)`},Rde={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};aL.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Rde,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Cde.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?Nde:oL}}});var Jf=S(ti=>{"use strict";h();var Ode=require("path"),Bde=process.platform==="win32",{REGEX_BACKSLASH:Mde,REGEX_REMOVE_BACKSLASH:Lde,REGEX_SPECIAL_CHARS:$de,REGEX_SPECIAL_CHARS_GLOBAL:jde}=Wf();ti.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ti.hasRegexChars=t=>$de.test(t);ti.isRegexChar=t=>t.length===1&&ti.hasRegexChars(t);ti.escapeRegex=t=>t.replace(jde,"\\$1");ti.toPosixSlashes=t=>t.replace(Mde,"/");ti.removeBackslashes=t=>t.replace(Lde,e=>e==="\\"?"":e);ti.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ti.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:Bde===!0||Ode.sep==="\\";ti.escapeLast=(t,e,r)=>{let n=t.lastIndexOf(e,r);return n===-1?t:t[n-1]==="\\"?ti.escapeLast(t,e,n-1):`${t.slice(0,n)}\\${t.slice(n)}`};ti.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ti.wrapOutput=(t,e={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${t})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var hL=S((Xze,mL)=>{"use strict";h();var cL=Jf(),{CHAR_ASTERISK:rw,CHAR_AT:Ude,CHAR_BACKWARD_SLASH:Yf,CHAR_COMMA:qde,CHAR_DOT:nw,CHAR_EXCLAMATION_MARK:iw,CHAR_FORWARD_SLASH:fL,CHAR_LEFT_CURLY_BRACE:sw,CHAR_LEFT_PARENTHESES:ow,CHAR_LEFT_SQUARE_BRACKET:zde,CHAR_PLUS:Gde,CHAR_QUESTION_MARK:uL,CHAR_RIGHT_CURLY_BRACE:Vde,CHAR_RIGHT_PARENTHESES:lL,CHAR_RIGHT_SQUARE_BRACKET:Hde}=Wf(),pL=t=>t===fL||t===Yf,dL=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Kde=(t,e)=>{let r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=t,u=-1,l=0,p=0,d=!1,m=!1,f=!1,g=!1,y=!1,v=!1,D=!1,E=!1,x=!1,b=!1,C=0,w,F,P={value:"",depth:0,isGlob:!1},A=()=>u>=n,_=()=>c.charCodeAt(u+1),z=()=>(w=F,c.charCodeAt(++u));for(;u<n;){F=z();let j;if(F===Yf){D=P.backslashes=!0,F=z(),F===sw&&(v=!0);continue}if(v===!0||F===sw){for(C++;A()!==!0&&(F=z());){if(F===Yf){D=P.backslashes=!0,z();continue}if(F===sw){C++;continue}if(v!==!0&&F===nw&&(F=z())===nw){if(d=P.isBrace=!0,f=P.isGlob=!0,b=!0,i===!0)continue;break}if(v!==!0&&F===qde){if(d=P.isBrace=!0,f=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===Vde&&(C--,C===0)){v=!1,d=P.isBrace=!0,b=!0;break}}if(i===!0)continue;break}if(F===fL){if(s.push(u),o.push(P),P={value:"",depth:0,isGlob:!1},b===!0)continue;if(w===nw&&u===l+1){l+=2;continue}p=u+1;continue}if(r.noext!==!0&&(F===Gde||F===Ude||F===rw||F===uL||F===iw)===!0&&_()===ow){if(f=P.isGlob=!0,g=P.isExtglob=!0,b=!0,F===iw&&u===l&&(x=!0),i===!0){for(;A()!==!0&&(F=z());){if(F===Yf){D=P.backslashes=!0,F=z();continue}if(F===lL){f=P.isGlob=!0,b=!0;break}}continue}break}if(F===rw){if(w===rw&&(y=P.isGlobstar=!0),f=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===uL){if(f=P.isGlob=!0,b=!0,i===!0)continue;break}if(F===zde){for(;A()!==!0&&(j=z());){if(j===Yf){D=P.backslashes=!0,z();continue}if(j===Hde){m=P.isBracket=!0,f=P.isGlob=!0,b=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&F===iw&&u===l){E=P.negated=!0,l++;continue}if(r.noparen!==!0&&F===ow){if(f=P.isGlob=!0,i===!0){for(;A()!==!0&&(F=z());){if(F===ow){D=P.backslashes=!0,F=z();continue}if(F===lL){b=!0;break}}continue}break}if(f===!0){if(b=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,f=!1);let M=c,U="",k="";l>0&&(U=c.slice(0,l),c=c.slice(l),p-=l),M&&f===!0&&p>0?(M=c.slice(0,p),k=c.slice(p)):f===!0?(M="",k=c):M=c,M&&M!==""&&M!=="/"&&M!==c&&pL(M.charCodeAt(M.length-1))&&(M=M.slice(0,-1)),r.unescape===!0&&(k&&(k=cL.removeBackslashes(k)),M&&D===!0&&(M=cL.removeBackslashes(M)));let O={prefix:U,input:t,start:l,base:M,glob:k,isBrace:d,isBracket:m,isGlob:f,isExtglob:g,isGlobstar:y,negated:E,negatedExtglob:x};if(r.tokens===!0&&(O.maxDepth=0,pL(F)||o.push(P),O.tokens=o),r.parts===!0||r.tokens===!0){let j;for(let G=0;G<s.length;G++){let Q=j?j+1:l,$=s[G],H=t.slice(Q,$);r.tokens&&(G===0&&l!==0?(o[G].isPrefix=!0,o[G].value=U):o[G].value=H,dL(o[G]),O.maxDepth+=o[G].depth),(G!==0||H!=="")&&a.push(H),j=$}if(j&&j+1<t.length){let G=t.slice(j+1);a.push(G),r.tokens&&(o[o.length-1].value=G,dL(o[o.length-1]),O.maxDepth+=o[o.length-1].depth)}O.slashes=s,O.parts=a}return O};mL.exports=Kde});var vL=S((Zze,yL)=>{"use strict";h();var Hy=Wf(),Si=Jf(),{MAX_LENGTH:Ky,POSIX_REGEX_SOURCE:Wde,REGEX_NON_SPECIAL_CHARS:Jde,REGEX_SPECIAL_CHARS_BACKREF:Yde,REPLACEMENTS:gL}=Hy,Xde=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>Si.escapeRegex(i)).join("..")}return r},sp=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,aw=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=gL[t]||t;let r={...e},n=typeof r.maxLength=="number"?Math.min(Ky,r.maxLength):Ky,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",c=Si.isWindows(e),u=Hy.globChars(c),l=Hy.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:m,ONE_CHAR:f,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:v,NO_DOTS_SLASH:D,QMARK:E,QMARK_NO_DOT:x,STAR:b,START_ANCHOR:C}=u,w=ue=>`(${a}(?:(?!${C}${ue.dot?g:p}).)*?)`,F=r.dot?"":y,P=r.dot?E:x,A=r.bash===!0?w(r):b;r.capture&&(A=`(${A})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let _={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Si.removePrefix(t,_),i=t.length;let z=[],M=[],U=[],k=s,O,j=()=>_.index===i-1,G=_.peek=(ue=1)=>t[_.index+ue],Q=_.advance=()=>t[++_.index]||"",$=()=>t.slice(_.index+1),H=(ue="",Ee=0)=>{_.consumed+=ue,_.index+=Ee},Z=ue=>{_.output+=ue.output!=null?ue.output:ue.value,H(ue.value)},le=()=>{let ue=1;for(;G()==="!"&&(G(2)!=="("||G(3)==="?");)Q(),_.start++,ue++;return ue%2===0?!1:(_.negated=!0,_.start++,!0)},pe=ue=>{_[ue]++,U.push(ue)},fe=ue=>{_[ue]--,U.pop()},oe=ue=>{if(k.type==="globstar"){let Ee=_.braces>0&&(ue.type==="comma"||ue.type==="brace"),re=ue.extglob===!0||z.length&&(ue.type==="pipe"||ue.type==="paren");ue.type!=="slash"&&ue.type!=="paren"&&!Ee&&!re&&(_.output=_.output.slice(0,-k.output.length),k.type="star",k.value="*",k.output=A,_.output+=k.output)}if(z.length&&ue.type!=="paren"&&(z[z.length-1].inner+=ue.value),(ue.value||ue.output)&&Z(ue),k&&k.type==="text"&&ue.type==="text"){k.value+=ue.value,k.output=(k.output||"")+ue.value;return}ue.prev=k,o.push(ue),k=ue},Ge=(ue,Ee)=>{let re={...l[Ee],conditions:1,inner:""};re.prev=k,re.parens=_.parens,re.output=_.output;let Re=(r.capture?"(":"")+re.open;pe("parens"),oe({type:ue,value:Ee,output:_.output?"":f}),oe({type:"paren",extglob:!0,value:Q(),output:Re}),z.push(re)},ct=ue=>{let Ee=ue.close+(r.capture?")":""),re;if(ue.type==="negate"){let Re=A;if(ue.inner&&ue.inner.length>1&&ue.inner.includes("/")&&(Re=w(r)),(Re!==A||j()||/^\)+$/.test($()))&&(Ee=ue.close=`)$))${Re}`),ue.inner.includes("*")&&(re=$())&&/^\.[^\\/.]+$/.test(re)){let ye=aw(re,{...e,fastpaths:!1}).output;Ee=ue.close=`)${ye})${Re})`}ue.prev.type==="bos"&&(_.negatedExtglob=!0)}oe({type:"paren",extglob:!0,value:O,output:Ee}),fe("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let ue=!1,Ee=t.replace(Yde,(re,Re,ye,Pe,Y,ce)=>Pe==="\\"?(ue=!0,re):Pe==="?"?Re?Re+Pe+(Y?E.repeat(Y.length):""):ce===0?P+(Y?E.repeat(Y.length):""):E.repeat(ye.length):Pe==="."?p.repeat(ye.length):Pe==="*"?Re?Re+Pe+(Y?A:""):A:Re?re:`\\${re}`);return ue===!0&&(r.unescape===!0?Ee=Ee.replace(/\\/g,""):Ee=Ee.replace(/\\+/g,re=>re.length%2===0?"\\\\":re?"\\":"")),Ee===t&&r.contains===!0?(_.output=t,_):(_.output=Si.wrapOutput(Ee,_,e),_)}for(;!j();){if(O=Q(),O==="\0")continue;if(O==="\\"){let re=G();if(re==="/"&&r.bash!==!0||re==="."||re===";")continue;if(!re){O+="\\",oe({type:"text",value:O});continue}let Re=/^\\+/.exec($()),ye=0;if(Re&&Re[0].length>2&&(ye=Re[0].length,_.index+=ye,ye%2!==0&&(O+="\\")),r.unescape===!0?O=Q():O+=Q(),_.brackets===0){oe({type:"text",value:O});continue}}if(_.brackets>0&&(O!=="]"||k.value==="["||k.value==="[^")){if(r.posix!==!1&&O===":"){let re=k.value.slice(1);if(re.includes("[")&&(k.posix=!0,re.includes(":"))){let Re=k.value.lastIndexOf("["),ye=k.value.slice(0,Re),Pe=k.value.slice(Re+2),Y=Wde[Pe];if(Y){k.value=ye+Y,_.backtrack=!0,Q(),!s.output&&o.indexOf(k)===1&&(s.output=f);continue}}}(O==="["&&G()!==":"||O==="-"&&G()==="]")&&(O=`\\${O}`),O==="]"&&(k.value==="["||k.value==="[^")&&(O=`\\${O}`),r.posix===!0&&O==="!"&&k.value==="["&&(O="^"),k.value+=O,Z({value:O});continue}if(_.quotes===1&&O!=='"'){O=Si.escapeRegex(O),k.value+=O,Z({value:O});continue}if(O==='"'){_.quotes=_.quotes===1?0:1,r.keepQuotes===!0&&oe({type:"text",value:O});continue}if(O==="("){pe("parens"),oe({type:"paren",value:O});continue}if(O===")"){if(_.parens===0&&r.strictBrackets===!0)throw new SyntaxError(sp("opening","("));let re=z[z.length-1];if(re&&_.parens===re.parens+1){ct(z.pop());continue}oe({type:"paren",value:O,output:_.parens?")":"\\)"}),fe("parens");continue}if(O==="["){if(r.nobracket===!0||!$().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(sp("closing","]"));O=`\\${O}`}else pe("brackets");oe({type:"bracket",value:O});continue}if(O==="]"){if(r.nobracket===!0||k&&k.type==="bracket"&&k.value.length===1){oe({type:"text",value:O,output:`\\${O}`});continue}if(_.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(sp("opening","["));oe({type:"text",value:O,output:`\\${O}`});continue}fe("brackets");let re=k.value.slice(1);if(k.posix!==!0&&re[0]==="^"&&!re.includes("/")&&(O=`/${O}`),k.value+=O,Z({value:O}),r.literalBrackets===!1||Si.hasRegexChars(re))continue;let Re=Si.escapeRegex(k.value);if(_.output=_.output.slice(0,-k.value.length),r.literalBrackets===!0){_.output+=Re,k.value=Re;continue}k.value=`(${a}${Re}|${k.value})`,_.output+=k.value;continue}if(O==="{"&&r.nobrace!==!0){pe("braces");let re={type:"brace",value:O,output:"(",outputIndex:_.output.length,tokensIndex:_.tokens.length};M.push(re),oe(re);continue}if(O==="}"){let re=M[M.length-1];if(r.nobrace===!0||!re){oe({type:"text",value:O,output:O});continue}let Re=")";if(re.dots===!0){let ye=o.slice(),Pe=[];for(let Y=ye.length-1;Y>=0&&(o.pop(),ye[Y].type!=="brace");Y--)ye[Y].type!=="dots"&&Pe.unshift(ye[Y].value);Re=Xde(Pe,r),_.backtrack=!0}if(re.comma!==!0&&re.dots!==!0){let ye=_.output.slice(0,re.outputIndex),Pe=_.tokens.slice(re.tokensIndex);re.value=re.output="\\{",O=Re="\\}",_.output=ye;for(let Y of Pe)_.output+=Y.output||Y.value}oe({type:"brace",value:O,output:Re}),fe("braces"),M.pop();continue}if(O==="|"){z.length>0&&z[z.length-1].conditions++,oe({type:"text",value:O});continue}if(O===","){let re=O,Re=M[M.length-1];Re&&U[U.length-1]==="braces"&&(Re.comma=!0,re="|"),oe({type:"comma",value:O,output:re});continue}if(O==="/"){if(k.type==="dot"&&_.index===_.start+1){_.start=_.index+1,_.consumed="",_.output="",o.pop(),k=s;continue}oe({type:"slash",value:O,output:m});continue}if(O==="."){if(_.braces>0&&k.type==="dot"){k.value==="."&&(k.output=p);let re=M[M.length-1];k.type="dots",k.output+=O,k.value+=O,re.dots=!0;continue}if(_.braces+_.parens===0&&k.type!=="bos"&&k.type!=="slash"){oe({type:"text",value:O,output:p});continue}oe({type:"dot",value:O,output:p});continue}if(O==="?"){if(!(k&&k.value==="(")&&r.noextglob!==!0&&G()==="("&&G(2)!=="?"){Ge("qmark",O);continue}if(k&&k.type==="paren"){let Re=G(),ye=O;if(Re==="<"&&!Si.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(k.value==="("&&!/[!=<:]/.test(Re)||Re==="<"&&!/<([!=]|\w+>)/.test($()))&&(ye=`\\${O}`),oe({type:"text",value:O,output:ye});continue}if(r.dot!==!0&&(k.type==="slash"||k.type==="bos")){oe({type:"qmark",value:O,output:x});continue}oe({type:"qmark",value:O,output:E});continue}if(O==="!"){if(r.noextglob!==!0&&G()==="("&&(G(2)!=="?"||!/[!=<:]/.test(G(3)))){Ge("negate",O);continue}if(r.nonegate!==!0&&_.index===0){le();continue}}if(O==="+"){if(r.noextglob!==!0&&G()==="("&&G(2)!=="?"){Ge("plus",O);continue}if(k&&k.value==="("||r.regex===!1){oe({type:"plus",value:O,output:d});continue}if(k&&(k.type==="bracket"||k.type==="paren"||k.type==="brace")||_.parens>0){oe({type:"plus",value:O});continue}oe({type:"plus",value:d});continue}if(O==="@"){if(r.noextglob!==!0&&G()==="("&&G(2)!=="?"){oe({type:"at",extglob:!0,value:O,output:""});continue}oe({type:"text",value:O});continue}if(O!=="*"){(O==="$"||O==="^")&&(O=`\\${O}`);let re=Jde.exec($());re&&(O+=re[0],_.index+=re[0].length),oe({type:"text",value:O});continue}if(k&&(k.type==="globstar"||k.star===!0)){k.type="star",k.star=!0,k.value+=O,k.output=A,_.backtrack=!0,_.globstar=!0,H(O);continue}let ue=$();if(r.noextglob!==!0&&/^\([^?]/.test(ue)){Ge("star",O);continue}if(k.type==="star"){if(r.noglobstar===!0){H(O);continue}let re=k.prev,Re=re.prev,ye=re.type==="slash"||re.type==="bos",Pe=Re&&(Re.type==="star"||Re.type==="globstar");if(r.bash===!0&&(!ye||ue[0]&&ue[0]!=="/")){oe({type:"star",value:O,output:""});continue}let Y=_.braces>0&&(re.type==="comma"||re.type==="brace"),ce=z.length&&(re.type==="pipe"||re.type==="paren");if(!ye&&re.type!=="paren"&&!Y&&!ce){oe({type:"star",value:O,output:""});continue}for(;ue.slice(0,3)==="/**";){let we=t[_.index+4];if(we&&we!=="/")break;ue=ue.slice(3),H("/**",3)}if(re.type==="bos"&&j()){k.type="globstar",k.value+=O,k.output=w(r),_.output=k.output,_.globstar=!0,H(O);continue}if(re.type==="slash"&&re.prev.type!=="bos"&&!Pe&&j()){_.output=_.output.slice(0,-(re.output+k.output).length),re.output=`(?:${re.output}`,k.type="globstar",k.output=w(r)+(r.strictSlashes?")":"|$)"),k.value+=O,_.globstar=!0,_.output+=re.output+k.output,H(O);continue}if(re.type==="slash"&&re.prev.type!=="bos"&&ue[0]==="/"){let we=ue[1]!==void 0?"|$":"";_.output=_.output.slice(0,-(re.output+k.output).length),re.output=`(?:${re.output}`,k.type="globstar",k.output=`${w(r)}${m}|${m}${we})`,k.value+=O,_.output+=re.output+k.output,_.globstar=!0,H(O+Q()),oe({type:"slash",value:"/",output:""});continue}if(re.type==="bos"&&ue[0]==="/"){k.type="globstar",k.value+=O,k.output=`(?:^|${m}|${w(r)}${m})`,_.output=k.output,_.globstar=!0,H(O+Q()),oe({type:"slash",value:"/",output:""});continue}_.output=_.output.slice(0,-k.output.length),k.type="globstar",k.output=w(r),k.value+=O,_.output+=k.output,_.globstar=!0,H(O);continue}let Ee={type:"star",value:O,output:A};if(r.bash===!0){Ee.output=".*?",(k.type==="bos"||k.type==="slash")&&(Ee.output=F+Ee.output),oe(Ee);continue}if(k&&(k.type==="bracket"||k.type==="paren")&&r.regex===!0){Ee.output=O,oe(Ee);continue}(_.index===_.start||k.type==="slash"||k.type==="dot")&&(k.type==="dot"?(_.output+=v,k.output+=v):r.dot===!0?(_.output+=D,k.output+=D):(_.output+=F,k.output+=F),G()!=="*"&&(_.output+=f,k.output+=f)),oe(Ee)}for(;_.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(sp("closing","]"));_.output=Si.escapeLast(_.output,"["),fe("brackets")}for(;_.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(sp("closing",")"));_.output=Si.escapeLast(_.output,"("),fe("parens")}for(;_.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(sp("closing","}"));_.output=Si.escapeLast(_.output,"{"),fe("braces")}if(r.strictSlashes!==!0&&(k.type==="star"||k.type==="bracket")&&oe({type:"maybe_slash",value:"",output:`${m}?`}),_.backtrack===!0){_.output="";for(let ue of _.tokens)_.output+=ue.output!=null?ue.output:ue.value,ue.suffix&&(_.output+=ue.suffix)}return _};aw.fastpaths=(t,e)=>{let r={...e},n=typeof r.maxLength=="number"?Math.min(Ky,r.maxLength):Ky,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=gL[t]||t;let s=Si.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:m,START_ANCHOR:f}=Hy.globChars(s),g=r.dot?p:l,y=r.dot?d:l,v=r.capture?"":"?:",D={negated:!1,prefix:""},E=r.bash===!0?".*?":m;r.capture&&(E=`(${E})`);let x=F=>F.noglobstar===!0?E:`(${v}(?:(?!${f}${F.dot?u:o}).)*?)`,b=F=>{switch(F){case"*":return`${g}${c}${E}`;case".*":return`${o}${c}${E}`;case"*.*":return`${g}${E}${o}${c}${E}`;case"*/*":return`${g}${E}${a}${c}${y}${E}`;case"**":return g+x(r);case"**/*":return`(?:${g}${x(r)}${a})?${y}${c}${E}`;case"**/*.*":return`(?:${g}${x(r)}${a})?${y}${E}${o}${c}${E}`;case"**/.*":return`(?:${g}${x(r)}${a})?${o}${c}${E}`;default:{let P=/^(.*?)\.(\w+)$/.exec(F);if(!P)return;let A=b(P[1]);return A?A+o+P[2]:void 0}}},C=Si.removePrefix(t,D),w=b(C);return w&&r.strictSlashes!==!0&&(w+=`${a}?`),w};yL.exports=aw});var xL=S((tGe,bL)=>{"use strict";h();var Qde=require("path"),Zde=hL(),cw=vL(),uw=Jf(),efe=Wf(),tfe=t=>t&&typeof t=="object"&&!Array.isArray(t),Tr=(t,e,r=!1)=>{if(Array.isArray(t)){let l=t.map(d=>Tr(d,e,r));return d=>{for(let m of l){let f=m(d);if(f)return f}return!1}}let n=tfe(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=uw.isWindows(e),o=n?Tr.compileRe(t,e):Tr.makeRe(t,e,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};c=Tr(i.ignore,l,r)}let u=(l,p=!1)=>{let{isMatch:d,match:m,output:f}=Tr.test(l,o,e,{glob:t,posix:s}),g={glob:t,state:a,regex:o,posix:s,input:l,output:f,match:m,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(l)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,p?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),p?g:!0)};return r&&(u.state=a),u};Tr.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?uw.toPosixSlashes:null),a=t===n,c=a&&o?o(t):t;return a===!1&&(c=o?o(t):t,a=c===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Tr.matchBase(t,e,r,i):a=e.exec(c)),{isMatch:!!a,match:a,output:c}};Tr.matchBase=(t,e,r,n=uw.isWindows(r))=>(e instanceof RegExp?e:Tr.makeRe(e,r)).test(Qde.basename(t));Tr.isMatch=(t,e,r)=>Tr(e,r)(t);Tr.parse=(t,e)=>Array.isArray(t)?t.map(r=>Tr.parse(r,e)):cw(t,{...e,fastpaths:!1});Tr.scan=(t,e)=>Zde(t,e);Tr.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let c=Tr.toRegex(a,e);return n===!0&&(c.state=t),c};Tr.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=cw.fastpaths(t,e)),i.output||(i=cw(t,e)),Tr.compileRe(i,e,r,n)};Tr.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Tr.constants=efe;bL.exports=Tr});var EL=S((nGe,DL)=>{"use strict";h();DL.exports=xL()});var Wy=S((sGe,PL)=>{"use strict";h();var wL=require("util"),SL=rL(),ao=EL(),lw=Jf(),CL=t=>t===""||t==="./",TL=t=>{let e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},nr=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<e.length;l++){let p=ao(String(e[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let m of t){let f=p(m,!0);(d?!f.isMatch:f.isMatch)&&(d?n.add(f.output):(n.delete(f.output),i.add(f.output)))}}let u=(o===e.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(l=>l.replace(/\\/g,"")):e}return u};nr.match=nr;nr.matcher=(t,e)=>ao(t,e);nr.isMatch=(t,e,r)=>ao(e,r)(t);nr.any=nr.isMatch;nr.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(nr(t,e,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};nr.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${wL.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>nr.contains(t,n,r));if(typeof e=="string"){if(CL(t)||CL(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return nr.isMatch(t,e,{...r,contains:!0})};nr.matchKeys=(t,e,r)=>{if(!lw.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=nr(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i};nr.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=ao(String(i),r);if(n.some(o=>s(o)))return!0}return!1};nr.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=ao(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};nr.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${wL.inspect(t)}"`);return[].concat(e).every(n=>ao(n,r)(t))};nr.capture=(t,e,r)=>{let n=lw.isWindows(r),s=ao.makeRe(String(t),{...r,capture:!0}).exec(n?lw.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};nr.makeRe=(...t)=>ao.makeRe(...t);nr.scan=(...t)=>ao.scan(...t);nr.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of SL(String(n),e))r.push(ao.parse(i,e));return r};nr.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!TL(t)?[t]:SL(t,e)};nr.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return nr.braces(t,{...e,expand:!0})};nr.hasBraces=TL;PL.exports=nr});var ML=S($e=>{"use strict";h();Object.defineProperty($e,"__esModule",{value:!0});$e.isAbsolute=$e.partitionAbsoluteAndRelative=$e.removeDuplicateSlashes=$e.matchAny=$e.convertPatternsToRe=$e.makeRe=$e.getPatternParts=$e.expandBraceExpansion=$e.expandPatternsWithBraceExpansion=$e.isAffectDepthOfReadingPattern=$e.endsWithSlashGlobStar=$e.hasGlobStar=$e.getBaseDirectory=$e.isPatternRelatedToParentDirectory=$e.getPatternsOutsideCurrentDirectory=$e.getPatternsInsideCurrentDirectory=$e.getPositivePatterns=$e.getNegativePatterns=$e.isPositivePattern=$e.isNegativePattern=$e.convertToNegativePattern=$e.convertToPositivePattern=$e.isDynamicPattern=$e.isStaticPattern=void 0;var AL=require("path"),rfe=x3(),pw=Wy(),_L="**",nfe="\\",ife=/[*?]|^!/,sfe=/\[[^[]*]/,ofe=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,afe=/[!*+?@]\([^(]*\)/,cfe=/,|\.\./,ufe=/(?!^)\/{2,}/g;function FL(t,e={}){return!kL(t,e)}$e.isStaticPattern=FL;function kL(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(nfe)||ife.test(t)||sfe.test(t)||ofe.test(t)||e.extglob!==!1&&afe.test(t)||e.braceExpansion!==!1&&lfe(t))}$e.isDynamicPattern=kL;function lfe(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let n=t.slice(e,r);return cfe.test(n)}function pfe(t){return Jy(t)?t.slice(1):t}$e.convertToPositivePattern=pfe;function dfe(t){return"!"+t}$e.convertToNegativePattern=dfe;function Jy(t){return t.startsWith("!")&&t[1]!=="("}$e.isNegativePattern=Jy;function IL(t){return!Jy(t)}$e.isPositivePattern=IL;function ffe(t){return t.filter(Jy)}$e.getNegativePatterns=ffe;function mfe(t){return t.filter(IL)}$e.getPositivePatterns=mfe;function hfe(t){return t.filter(e=>!dw(e))}$e.getPatternsInsideCurrentDirectory=hfe;function gfe(t){return t.filter(dw)}$e.getPatternsOutsideCurrentDirectory=gfe;function dw(t){return t.startsWith("..")||t.startsWith("./..")}$e.isPatternRelatedToParentDirectory=dw;function yfe(t){return rfe(t,{flipBackslashes:!1})}$e.getBaseDirectory=yfe;function vfe(t){return t.includes(_L)}$e.hasGlobStar=vfe;function NL(t){return t.endsWith("/"+_L)}$e.endsWithSlashGlobStar=NL;function bfe(t){let e=AL.basename(t);return NL(t)||FL(e)}$e.isAffectDepthOfReadingPattern=bfe;function xfe(t){return t.reduce((e,r)=>e.concat(RL(r)),[])}$e.expandPatternsWithBraceExpansion=xfe;function RL(t){let e=pw.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,n)=>r.length-n.length),e.filter(r=>r!=="")}$e.expandBraceExpansion=RL;function Dfe(t,e){let{parts:r}=pw.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}$e.getPatternParts=Dfe;function OL(t,e){return pw.makeRe(t,e)}$e.makeRe=OL;function Efe(t,e){return t.map(r=>OL(r,e))}$e.convertPatternsToRe=Efe;function Cfe(t,e){return e.some(r=>r.test(t))}$e.matchAny=Cfe;function wfe(t){return t.replace(ufe,"/")}$e.removeDuplicateSlashes=wfe;function Sfe(t){let e=[],r=[];for(let n of t)BL(n)?e.push(n):r.push(n);return[e,r]}$e.partitionAbsoluteAndRelative=Sfe;function BL(t){return AL.isAbsolute(t)}$e.isAbsolute=BL});var UL=S((uGe,jL)=>{"use strict";h();var Tfe=require("stream"),LL=Tfe.PassThrough,Pfe=Array.prototype.slice;jL.exports=Afe;function Afe(){let t=[],e=Pfe.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=LL(n);function a(){for(let l=0,p=arguments.length;l<p;l++)t.push($L(arguments[l],n));return c(),this}function c(){if(r)return;r=!0;let l=t.shift();if(!l){process.nextTick(u);return}Array.isArray(l)||(l=[l]);let p=l.length+1;function d(){--p>0||(r=!1,c())}function m(f){function g(){f.removeListener("merge2UnpipeEnd",g),f.removeListener("end",g),s&&f.removeListener("error",y),d()}function y(v){o.emit("error",v)}if(f._readableState.endEmitted)return d();f.on("merge2UnpipeEnd",g),f.on("end",g),s&&f.on("error",y),f.pipe(o,{end:!1}),f.resume()}for(let f=0;f<l.length;f++)m(l[f]);d()}function u(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(l){l.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function $L(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=$L(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(LL(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var zL=S(Yy=>{"use strict";h();Object.defineProperty(Yy,"__esModule",{value:!0});Yy.merge=void 0;var _fe=UL();function Ffe(t){let e=_fe(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>qL(t)),e.once("end",()=>qL(t)),e}Yy.merge=Ffe;function qL(t){t.forEach(e=>e.emit("close"))}});var GL=S(op=>{"use strict";h();Object.defineProperty(op,"__esModule",{value:!0});op.isEmpty=op.isString=void 0;function kfe(t){return typeof t=="string"}op.isString=kfe;function Ife(t){return t===""}op.isEmpty=Ife});var Jo=S(xn=>{"use strict";h();Object.defineProperty(xn,"__esModule",{value:!0});xn.string=xn.stream=xn.pattern=xn.path=xn.fs=xn.errno=xn.array=void 0;var Nfe=a3();xn.array=Nfe;var Rfe=c3();xn.errno=Rfe;var Ofe=u3();xn.fs=Ofe;var Bfe=f3();xn.path=Bfe;var Mfe=ML();xn.pattern=Mfe;var Lfe=zL();xn.stream=Lfe;var $fe=GL();xn.string=$fe});var WL=S(Dn=>{"use strict";h();Object.defineProperty(Dn,"__esModule",{value:!0});Dn.convertPatternGroupToTask=Dn.convertPatternGroupsToTasks=Dn.groupPatternsByBaseDirectory=Dn.getNegativePatternsAsPositive=Dn.getPositivePatterns=Dn.convertPatternsToTasks=Dn.generate=void 0;var _s=Jo();function jfe(t,e){let r=VL(t,e),n=VL(e.ignore,e),i=HL(r),s=KL(r,n),o=i.filter(l=>_s.pattern.isStaticPattern(l,e)),a=i.filter(l=>_s.pattern.isDynamicPattern(l,e)),c=fw(o,s,!1),u=fw(a,s,!0);return c.concat(u)}Dn.generate=jfe;function VL(t,e){let r=t;return e.braceExpansion&&(r=_s.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>_s.pattern.removeDuplicateSlashes(n))}function fw(t,e,r){let n=[],i=_s.pattern.getPatternsOutsideCurrentDirectory(t),s=_s.pattern.getPatternsInsideCurrentDirectory(t),o=mw(i),a=mw(s);return n.push(...hw(o,e,r)),"."in a?n.push(gw(".",s,e,r)):n.push(...hw(a,e,r)),n}Dn.convertPatternsToTasks=fw;function HL(t){return _s.pattern.getPositivePatterns(t)}Dn.getPositivePatterns=HL;function KL(t,e){return _s.pattern.getNegativePatterns(t).concat(e).map(_s.pattern.convertToPositivePattern)}Dn.getNegativePatternsAsPositive=KL;function mw(t){let e={};return t.reduce((r,n)=>{let i=_s.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}Dn.groupPatternsByBaseDirectory=mw;function hw(t,e,r){return Object.keys(t).map(n=>gw(n,t[n],e,r))}Dn.convertPatternGroupsToTasks=hw;function gw(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(_s.pattern.convertToNegativePattern))}}Dn.convertPatternGroupToTask=gw});var YL=S(Xy=>{"use strict";h();Object.defineProperty(Xy,"__esModule",{value:!0});Xy.read=void 0;function Ufe(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){JL(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){yw(r,i);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){JL(r,s);return}yw(r,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),yw(r,o)})})}Xy.read=Ufe;function JL(t,e){t(e)}function yw(t,e){t(null,e)}});var XL=S(Qy=>{"use strict";h();Object.defineProperty(Qy,"__esModule",{value:!0});Qy.read=void 0;function qfe(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}Qy.read=qfe});var QL=S(Na=>{"use strict";h();Object.defineProperty(Na,"__esModule",{value:!0});Na.createFileSystemAdapter=Na.FILE_SYSTEM_ADAPTER=void 0;var Zy=require("fs");Na.FILE_SYSTEM_ADAPTER={lstat:Zy.lstat,stat:Zy.stat,lstatSync:Zy.lstatSync,statSync:Zy.statSync};function zfe(t){return t===void 0?Na.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Na.FILE_SYSTEM_ADAPTER),t)}Na.createFileSystemAdapter=zfe});var ZL=S(bw=>{"use strict";h();Object.defineProperty(bw,"__esModule",{value:!0});var Gfe=QL(),vw=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Gfe.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};bw.default=vw});var Jc=S(Ra=>{"use strict";h();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.statSync=Ra.stat=Ra.Settings=void 0;var e4=YL(),Vfe=XL(),xw=ZL();Ra.Settings=xw.default;function Hfe(t,e,r){if(typeof e=="function"){e4.read(t,Dw(),e);return}e4.read(t,Dw(e),r)}Ra.stat=Hfe;function Kfe(t,e){let r=Dw(e);return Vfe.read(t,r)}Ra.statSync=Kfe;function Dw(t={}){return t instanceof xw.default?t:new xw.default(t)}});var n4=S((_Ge,r4)=>{h();var t4;r4.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):t=>(t4||(t4=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var s4=S((kGe,i4)=>{h();i4.exports=Jfe;var Wfe=n4();function Jfe(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function o(c){function u(){e&&e(c,r),e=null}s?Wfe(u):u()}function a(c,u,l){r[c]=l,(--n===0||u)&&o(u)}n?i?i.forEach(function(c){t[c](function(u,l){a(c,u,l)})}):t.forEach(function(c,u){c(function(l,p){a(u,l,p)})}):o(null),s=!1}});var Ew=S(tv=>{"use strict";h();Object.defineProperty(tv,"__esModule",{value:!0});tv.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var ev=process.versions.node.split(".");if(ev[0]===void 0||ev[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var o4=Number.parseInt(ev[0],10),Yfe=Number.parseInt(ev[1],10),a4=10,Xfe=10,Qfe=o4>a4,Zfe=o4===a4&&Yfe>=Xfe;tv.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Qfe||Zfe});var c4=S(rv=>{"use strict";h();Object.defineProperty(rv,"__esModule",{value:!0});rv.createDirentFromStats=void 0;var Cw=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function eme(t,e){return new Cw(t,e)}rv.createDirentFromStats=eme});var ww=S(nv=>{"use strict";h();Object.defineProperty(nv,"__esModule",{value:!0});nv.fs=void 0;var tme=c4();nv.fs=tme});var Sw=S(iv=>{"use strict";h();Object.defineProperty(iv,"__esModule",{value:!0});iv.joinPathSegments=void 0;function rme(t,e,r){return t.endsWith(r)?t+e:t+r+e}iv.joinPathSegments=rme});var m4=S(Oa=>{"use strict";h();Object.defineProperty(Oa,"__esModule",{value:!0});Oa.readdir=Oa.readdirWithFileTypes=Oa.read=void 0;var nme=Jc(),u4=s4(),ime=Ew(),l4=ww(),p4=Sw();function sme(t,e,r){if(!e.stats&&ime.IS_SUPPORT_READDIR_WITH_FILE_TYPES){d4(t,e,r);return}f4(t,e,r)}Oa.read=sme;function d4(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){sv(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:p4.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Tw(r,s);return}let o=s.map(a=>ome(a,e));u4(o,(a,c)=>{if(a!==null){sv(r,a);return}Tw(r,c)})})}Oa.readdirWithFileTypes=d4;function ome(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=l4.fs.createDirentFromStats(t.name,i),r(null,t)})}}function f4(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){sv(r,n);return}let s=i.map(o=>{let a=p4.joinPathSegments(t,o,e.pathSegmentSeparator);return c=>{nme.stat(a,e.fsStatSettings,(u,l)=>{if(u!==null){c(u);return}let p={name:o,path:a,dirent:l4.fs.createDirentFromStats(o,l)};e.stats&&(p.stats=l),c(null,p)})}});u4(s,(o,a)=>{if(o!==null){sv(r,o);return}Tw(r,a)})})}Oa.readdir=f4;function sv(t,e){t(e)}function Tw(t,e){t(null,e)}});var b4=S(Ba=>{"use strict";h();Object.defineProperty(Ba,"__esModule",{value:!0});Ba.readdir=Ba.readdirWithFileTypes=Ba.read=void 0;var ame=Jc(),cme=Ew(),h4=ww(),g4=Sw();function ume(t,e){return!e.stats&&cme.IS_SUPPORT_READDIR_WITH_FILE_TYPES?y4(t,e):v4(t,e)}Ba.read=ume;function y4(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:g4.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=h4.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}Ba.readdirWithFileTypes=y4;function v4(t,e){return e.fs.readdirSync(t).map(n=>{let i=g4.joinPathSegments(t,n,e.pathSegmentSeparator),s=ame.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:h4.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}Ba.readdir=v4});var x4=S(Ma=>{"use strict";h();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.createFileSystemAdapter=Ma.FILE_SYSTEM_ADAPTER=void 0;var ap=require("fs");Ma.FILE_SYSTEM_ADAPTER={lstat:ap.lstat,stat:ap.stat,lstatSync:ap.lstatSync,statSync:ap.statSync,readdir:ap.readdir,readdirSync:ap.readdirSync};function lme(t){return t===void 0?Ma.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ma.FILE_SYSTEM_ADAPTER),t)}Ma.createFileSystemAdapter=lme});var D4=S(Aw=>{"use strict";h();Object.defineProperty(Aw,"__esModule",{value:!0});var pme=require("path"),dme=Jc(),fme=x4(),Pw=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=fme.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,pme.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new dme.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Aw.default=Pw});var ov=S(La=>{"use strict";h();Object.defineProperty(La,"__esModule",{value:!0});La.Settings=La.scandirSync=La.scandir=void 0;var E4=m4(),mme=b4(),_w=D4();La.Settings=_w.default;function hme(t,e,r){if(typeof e=="function"){E4.read(t,Fw(),e);return}E4.read(t,Fw(e),r)}La.scandir=hme;function gme(t,e){let r=Fw(e);return mme.read(t,r)}La.scandirSync=gme;function Fw(t={}){return t instanceof _w.default?t:new _w.default(t)}});var w4=S((XGe,C4)=>{"use strict";h();function yme(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}C4.exports=yme});var T4=S((ZGe,kw)=>{"use strict";h();var vme=w4();function S4(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=vme(bme),i=null,s=null,o=0,a=null,c={push:g,drain:Wi,saturated:Wi,pause:l,paused:!1,get concurrency(){return r},set concurrency(b){if(!(b>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=b,!c.paused)for(;i&&o<r;)o++,v()},running:u,resume:m,idle:f,length:p,getQueue:d,unshift:y,empty:Wi,kill:D,killAndDrain:E,error:x};return c;function u(){return o}function l(){c.paused=!0}function p(){for(var b=i,C=0;b;)b=b.next,C++;return C}function d(){for(var b=i,C=[];b;)C.push(b.value),b=b.next;return C}function m(){if(c.paused){if(c.paused=!1,i===null){o++,v();return}for(;i&&o<r;)o++,v()}}function f(){return o===0&&c.length()===0}function g(b,C){var w=n.get();w.context=t,w.release=v,w.value=b,w.callback=C||Wi,w.errorHandler=a,o>=r||c.paused?s?(s.next=w,s=w):(i=w,s=w,c.saturated()):(o++,e.call(t,w.value,w.worked))}function y(b,C){var w=n.get();w.context=t,w.release=v,w.value=b,w.callback=C||Wi,w.errorHandler=a,o>=r||c.paused?i?(w.next=i,i=w):(i=w,s=w,c.saturated()):(o++,e.call(t,w.value,w.worked))}function v(b){b&&n.release(b);var C=i;C&&o<=r?c.paused?o--:(s===i&&(s=null),i=C.next,C.next=null,e.call(t,C.value,C.worked),s===null&&c.empty()):--o===0&&c.drain()}function D(){i=null,s=null,c.drain=Wi}function E(){i=null,s=null,c.drain(),c.drain=Wi}function x(b){a=b}}function Wi(){}function bme(){this.value=null,this.callback=Wi,this.next=null,this.release=Wi,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=Wi,t.errorHandler&&s(r,o),i.call(t.context,r,n),t.release(t)}}function xme(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(l,p){e.call(this,l).then(function(d){p(null,d)},p)}var i=S4(t,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=u,i;function a(l){var p=new Promise(function(d,m){s(l,function(f,g){if(f){m(f);return}d(g)})});return p.catch(Wi),p}function c(l){var p=new Promise(function(d,m){o(l,function(f,g){if(f){m(f);return}d(g)})});return p.catch(Wi),p}function u(){var l=new Promise(function(p){process.nextTick(function(){if(i.idle())p();else{var d=i.drain;i.drain=function(){typeof d=="function"&&d(),p(),i.drain=d}}})});return l}}kw.exports=S4;kw.exports.promise=xme});var av=S(co=>{"use strict";h();Object.defineProperty(co,"__esModule",{value:!0});co.joinPathSegments=co.replacePathSegmentSeparator=co.isAppliedFilter=co.isFatalError=void 0;function Dme(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}co.isFatalError=Dme;function Eme(t,e){return t===null||t(e)}co.isAppliedFilter=Eme;function Cme(t,e){return t.split(/[/\\]/).join(e)}co.replacePathSegmentSeparator=Cme;function wme(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}co.joinPathSegments=wme});var Rw=S(Nw=>{"use strict";h();Object.defineProperty(Nw,"__esModule",{value:!0});var Sme=av(),Iw=class{constructor(e,r){this._root=e,this._settings=r,this._root=Sme.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};Nw.default=Iw});var Mw=S(Bw=>{"use strict";h();Object.defineProperty(Bw,"__esModule",{value:!0});var Tme=require("events"),Pme=ov(),Ame=T4(),cv=av(),_me=Rw(),Ow=class extends _me.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=Pme.scandir,this._emitter=new Tme.EventEmitter,this._queue=Ame(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!cv.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=cv.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),cv.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&cv.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};Bw.default=Ow});var P4=S($w=>{"use strict";h();Object.defineProperty($w,"__esModule",{value:!0});var Fme=Mw(),Lw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Fme.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{kme(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Ime(e,this._storage)}),this._reader.read()}};$w.default=Lw;function kme(t,e){t(e)}function Ime(t,e){t(null,e)}});var A4=S(Uw=>{"use strict";h();Object.defineProperty(Uw,"__esModule",{value:!0});var Nme=require("stream"),Rme=Mw(),jw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Rme.default(this._root,this._settings),this._stream=new Nme.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Uw.default=jw});var _4=S(zw=>{"use strict";h();Object.defineProperty(zw,"__esModule",{value:!0});var Ome=ov(),uv=av(),Bme=Rw(),qw=class extends Bme.default{constructor(){super(...arguments),this._scandir=Ome.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(uv.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=uv.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),uv.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&uv.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};zw.default=qw});var F4=S(Vw=>{"use strict";h();Object.defineProperty(Vw,"__esModule",{value:!0});var Mme=_4(),Gw=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Mme.default(this._root,this._settings)}read(){return this._reader.read()}};Vw.default=Gw});var k4=S(Kw=>{"use strict";h();Object.defineProperty(Kw,"__esModule",{value:!0});var Lme=require("path"),$me=ov(),Hw=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Lme.sep),this.fsScandirSettings=new $me.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Kw.default=Hw});var pv=S(uo=>{"use strict";h();Object.defineProperty(uo,"__esModule",{value:!0});uo.Settings=uo.walkStream=uo.walkSync=uo.walk=void 0;var I4=P4(),jme=A4(),Ume=F4(),Ww=k4();uo.Settings=Ww.default;function qme(t,e,r){if(typeof e=="function"){new I4.default(t,lv()).read(e);return}new I4.default(t,lv(e)).read(r)}uo.walk=qme;function zme(t,e){let r=lv(e);return new Ume.default(t,r).read()}uo.walkSync=zme;function Gme(t,e){let r=lv(e);return new jme.default(t,r).read()}uo.walkStream=Gme;function lv(t={}){return t instanceof Ww.default?t:new Ww.default(t)}});var dv=S(Yw=>{"use strict";h();Object.defineProperty(Yw,"__esModule",{value:!0});var Vme=require("path"),Hme=Jc(),N4=Jo(),Jw=class{constructor(e){this._settings=e,this._fsStatSettings=new Hme.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return Vme.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:N4.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!N4.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};Yw.default=Jw});var Zw=S(Qw=>{"use strict";h();Object.defineProperty(Qw,"__esModule",{value:!0});var Kme=require("stream"),Wme=Jc(),Jme=pv(),Yme=dv(),Xw=class extends Yme.default{constructor(){super(...arguments),this._walkStream=Jme.walkStream,this._stat=Wme.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),i=new Kme.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],r).then(c=>{c!==null&&r.entryFilter(c)&&i.push(c),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};Qw.default=Xw});var R4=S(tS=>{"use strict";h();Object.defineProperty(tS,"__esModule",{value:!0});var Xme=pv(),Qme=dv(),Zme=Zw(),eS=class extends Qme.default{constructor(){super(...arguments),this._walkAsync=Xme.walk,this._readerStream=new Zme.default(this._settings)}dynamic(e,r){return new Promise((n,i)=>{this._walkAsync(e,r,(s,o)=>{s===null?n(o):i(s)})})}async static(e,r){let n=[],i=this._readerStream.static(e,r);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};tS.default=eS});var O4=S(nS=>{"use strict";h();Object.defineProperty(nS,"__esModule",{value:!0});var Xf=Jo(),rS=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let e of this._patterns){let r=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:e,segments:r,sections:n})}}_getPatternSegments(e){return Xf.pattern.getPatternParts(e,this._micromatchOptions).map(n=>Xf.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Xf.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return Xf.array.splitWhen(e,r=>r.dynamic&&Xf.pattern.hasGlobStar(r.pattern))}};nS.default=rS});var B4=S(sS=>{"use strict";h();Object.defineProperty(sS,"__esModule",{value:!0});var ehe=O4(),iS=class extends ehe.default{match(e){let r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((c,u)=>{let l=s.segments[u];return!!(l.dynamic&&l.patternRe.test(c)||!l.dynamic&&l.pattern===c)}))return!0}return!1}};sS.default=iS});var M4=S(aS=>{"use strict";h();Object.defineProperty(aS,"__esModule",{value:!0});var fv=Jo(),the=B4(),oS=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new the.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(fv.pattern.isAffectDepthOfReadingPattern);return fv.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=fv.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!fv.pattern.matchAny(e,r)}};aS.default=oS});var L4=S(uS=>{"use strict";h();Object.defineProperty(uS,"__esModule",{value:!0});var $a=Jo(),cS=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let[n,i]=$a.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:$a.pattern.convertPatternsToRe(e,this._micromatchOptions)},negative:{absolute:$a.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:$a.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(e,r){let n=$a.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;let i=this._isMatchToPatternsSet(n,r,e.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isMatchToPatternsSet(e,r,n){return!(!this._isMatchToPatterns(e,r.positive.all,n)||this._isMatchToPatterns(e,r.negative.relative,n)||this._isMatchToAbsoluteNegative(e,r.negative.absolute,n))}_isMatchToAbsoluteNegative(e,r,n){if(r.length===0)return!1;let i=$a.path.makeAbsolute(this._settings.cwd,e);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(e,r,n){if(r.length===0)return!1;let i=$a.pattern.matchAny(e,r);return!i&&n?$a.pattern.matchAny(e+"/",r):i}};uS.default=cS});var $4=S(pS=>{"use strict";h();Object.defineProperty(pS,"__esModule",{value:!0});var rhe=Jo(),lS=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return rhe.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};pS.default=lS});var U4=S(fS=>{"use strict";h();Object.defineProperty(fS,"__esModule",{value:!0});var j4=Jo(),dS=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=j4.path.makeAbsolute(this._settings.cwd,r),r=j4.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};fS.default=dS});var mv=S(hS=>{"use strict";h();Object.defineProperty(hS,"__esModule",{value:!0});var nhe=require("path"),ihe=M4(),she=L4(),ohe=$4(),ahe=U4(),mS=class{constructor(e){this._settings=e,this.errorFilter=new ohe.default(this._settings),this.entryFilter=new she.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new ihe.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new ahe.default(this._settings)}_getRootDirectory(e){return nhe.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};hS.default=mS});var q4=S(yS=>{"use strict";h();Object.defineProperty(yS,"__esModule",{value:!0});var che=R4(),uhe=mv(),gS=class extends uhe.default{constructor(){super(...arguments),this._reader=new che.default(this._settings)}async read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(r,e,n)).map(s=>n.transform(s))}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};yS.default=gS});var z4=S(bS=>{"use strict";h();Object.defineProperty(bS,"__esModule",{value:!0});var lhe=require("stream"),phe=Zw(),dhe=mv(),vS=class extends dhe.default{constructor(){super(...arguments),this._reader=new phe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new lhe.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};bS.default=vS});var G4=S(DS=>{"use strict";h();Object.defineProperty(DS,"__esModule",{value:!0});var fhe=Jc(),mhe=pv(),hhe=dv(),xS=class extends hhe.default{constructor(){super(...arguments),this._walkSync=mhe.walkSync,this._statSync=fhe.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(e,r,n){try{let i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};DS.default=xS});var V4=S(CS=>{"use strict";h();Object.defineProperty(CS,"__esModule",{value:!0});var ghe=G4(),yhe=mv(),ES=class extends yhe.default{constructor(){super(...arguments),this._reader=new ghe.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};CS.default=ES});var H4=S(up=>{"use strict";h();Object.defineProperty(up,"__esModule",{value:!0});up.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var cp=require("fs"),vhe=require("os"),bhe=Math.max(vhe.cpus().length,1);up.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:cp.lstat,lstatSync:cp.lstatSync,stat:cp.stat,statSync:cp.statSync,readdir:cp.readdir,readdirSync:cp.readdirSync};var wS=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,bhe),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},up.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};up.default=wS});var AS=S((JVe,W4)=>{"use strict";h();var K4=WL(),xhe=q4(),Dhe=z4(),Ehe=V4(),SS=H4(),Ji=Jo();async function TS(t,e){Fs(t);let r=PS(t,xhe.default,e),n=await Promise.all(r);return Ji.array.flatten(n)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(u,l){Fs(u);let p=PS(u,Ehe.default,l);return Ji.array.flatten(p)}t.sync=e;function r(u,l){Fs(u);let p=PS(u,Dhe.default,l);return Ji.stream.merge(p)}t.stream=r;function n(u,l){Fs(u);let p=[].concat(u),d=new SS.default(l);return K4.generate(p,d)}t.generateTasks=n;function i(u,l){Fs(u);let p=new SS.default(l);return Ji.pattern.isDynamicPattern(u,p)}t.isDynamicPattern=i;function s(u){return Fs(u),Ji.path.escape(u)}t.escapePath=s;function o(u){return Fs(u),Ji.path.convertPathToPattern(u)}t.convertPathToPattern=o;let a;(function(u){function l(d){return Fs(d),Ji.path.escapePosixPath(d)}u.escapePath=l;function p(d){return Fs(d),Ji.path.convertPosixPathToPattern(d)}u.convertPathToPattern=p})(a=t.posix||(t.posix={}));let c;(function(u){function l(d){return Fs(d),Ji.path.escapeWindowsPath(d)}u.escapePath=l;function p(d){return Fs(d),Ji.path.convertWindowsPathToPattern(d)}u.convertPathToPattern=p})(c=t.win32||(t.win32={}))})(TS||(TS={}));function PS(t,e,r){let n=[].concat(t),i=new SS.default(r),s=K4.generate(n,i),o=new e(i);return s.map(o.read,o)}function Fs(t){if(![].concat(t).every(n=>Ji.string.isString(n)&&!Ji.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}W4.exports=TS});async function _S(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await Y4.default[t](r))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function FS(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return J4.default[t](r)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var J4,Y4,XVe,X4,QVe,ZVe,Q4,eHe,Z4=N(()=>{h();J4=J(require("node:fs"),1),Y4=J(require("node:fs/promises"),1);XVe=_S.bind(void 0,"stat","isFile"),X4=_S.bind(void 0,"stat","isDirectory"),QVe=_S.bind(void 0,"lstat","isSymbolicLink"),ZVe=FS.bind(void 0,"statSync","isFile"),Q4=FS.bind(void 0,"statSync","isDirectory"),eHe=FS.bind(void 0,"lstatSync","isSymbolicLink")});var e6=N(()=>{h()});function Qf(t){return t instanceof URL?(0,r6.fileURLToPath)(t):t}var t6,kS,r6,sHe,oHe,IS=N(()=>{h();t6=require("node:util"),kS=require("node:child_process"),r6=require("node:url");e6();sHe=(0,t6.promisify)(kS.execFile);oHe=10*1024*1024});function lp(t){return t.startsWith("\\\\?\\")?t:t.replace(/\\/g,"/")}var n6=N(()=>{h()});var Zf,NS=N(()=>{h();Zf=t=>t[0]==="!"});var i6,s6,o6,Yc,RS,a6,Che,c6,u6,whe,She,The,l6,p6,d6,f6,m6=N(()=>{h();i6=J(require("node:process"),1),s6=J(require("node:fs"),1),o6=J(require("node:fs/promises"),1),Yc=J(require("node:path"),1),RS=J(AS(),1),a6=J(require("ignore"),1);n6();IS();NS();Che=["**/node_modules","**/flow-typed","**/coverage","**/.git"],c6={absolute:!0,dot:!0},u6="**/.gitignore",whe=(t,e)=>Zf(t)?"!"+Yc.default.posix.join(e,t.slice(1)):Yc.default.posix.join(e,t),She=(t,e)=>{let r=lp(Yc.default.relative(e,Yc.default.dirname(t.filePath)));return t.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>whe(n,r))},The=(t,e)=>{if(e=lp(e),Yc.default.isAbsolute(t)){if(lp(t).startsWith(e))return Yc.default.relative(e,t);throw new Error(`Path ${t} is not in cwd ${e}`)}return t},l6=(t,e)=>{let r=t.flatMap(i=>She(i,e)),n=(0,a6.default)().add(r);return i=>(i=Qf(i),i=The(i,e),i?n.ignores(lp(i)):!1)},p6=(t={})=>({cwd:Qf(t.cwd)??i6.default.cwd(),suppressErrors:!!t.suppressErrors,deep:typeof t.deep=="number"?t.deep:Number.POSITIVE_INFINITY,ignore:[...t.ignore??[],...Che]}),d6=async(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=p6(e),o=await(0,RS.default)(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...c6}),a=await Promise.all(o.map(async c=>({filePath:c,content:await o6.default.readFile(c,"utf8")})));return l6(a,r)},f6=(t,e)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=p6(e),a=RS.default.sync(t,{cwd:r,suppressErrors:n,deep:i,ignore:s,...c6}).map(c=>({filePath:c,content:s6.default.readFileSync(c,"utf8")}));return l6(a,r)}});var OS,y6,Xc,pp,Phe,v6,b6,h6,g6,BS,Ahe,x6,D6,hv,E6,_he,C6,w6,S6,T6,P6,A6,MS,LS,wHe,SHe,THe,PHe,AHe,_He,_6=N(()=>{h();OS=J(require("node:process"),1),y6=J(require("node:fs"),1),Xc=J(require("node:path"),1);o3();pp=J(AS(),1);Z4();IS();m6();NS();Phe=t=>{if(t.some(e=>typeof e!="string"))throw new TypeError("Patterns must be a string or an array of strings")},v6=(t,e)=>{let r=Zf(t)?t.slice(1):t;return Xc.default.isAbsolute(r)?r:Xc.default.join(e,r)},b6=({directoryPath:t,files:e,extensions:r})=>{let n=r?.length>0?`.${r.length>1?`{${r.join(",")}}`:r[0]}`:"";return e?e.map(i=>Xc.default.posix.join(t,`**/${Xc.default.extname(i)?i:`${i}${n}`}`)):[Xc.default.posix.join(t,`**${n?`/*${n}`:""}`)]},h6=async(t,{cwd:e=OS.default.cwd(),files:r,extensions:n}={})=>(await Promise.all(t.map(async s=>await X4(v6(s,e))?b6({directoryPath:s,files:r,extensions:n}):s))).flat(),g6=(t,{cwd:e=OS.default.cwd(),files:r,extensions:n}={})=>t.flatMap(i=>Q4(v6(i,e))?b6({directoryPath:i,files:r,extensions:n}):i),BS=t=>(t=[...new Set([t].flat())],Phe(t),t),Ahe=t=>{if(!t)return;let e;try{e=y6.default.statSync(t)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},x6=(t={})=>(t={...t,ignore:t.ignore??[],expandDirectories:t.expandDirectories??!0,cwd:Qf(t.cwd)},Ahe(t.cwd),t),D6=t=>async(e,r)=>t(BS(e),x6(r)),hv=t=>(e,r)=>t(BS(e),x6(r)),E6=t=>{let{ignoreFiles:e,gitignore:r}=t,n=e?BS(e):[];return r&&n.push(u6),n},_he=async t=>{let e=E6(t);return w6(e.length>0&&await d6(e,t))},C6=t=>{let e=E6(t);return w6(e.length>0&&f6(e,t))},w6=t=>{let e=new Set;return r=>{let n=Xc.default.normalize(r.path??r);return e.has(n)||t&&t(n)?!1:(e.add(n),!0)}},S6=(t,e)=>t.flat().filter(r=>e(r)),T6=(t,e)=>{let r=[];for(;t.length>0;){let n=t.findIndex(s=>Zf(s));if(n===-1){r.push({patterns:t,options:e});break}let i=t[n].slice(1);for(let s of r)s.options.ignore.push(i);n!==0&&r.push({patterns:t.slice(0,n),options:{...e,ignore:[...e.ignore,i]}}),t=t.slice(n+1)}return r},P6=(t,e)=>({...e?{cwd:e}:{},...Array.isArray(t)?{files:t}:t}),A6=async(t,e)=>{let r=T6(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=P6(i,n);return Promise.all(r.map(async o=>{let{patterns:a,options:c}=o;return[a,c.ignore]=await Promise.all([h6(a,s),h6(c.ignore,{cwd:n})]),{patterns:a,options:c}}))},MS=(t,e)=>{let r=T6(t,e),{cwd:n,expandDirectories:i}=e;if(!i)return r;let s=P6(i,n);return r.map(o=>{let{patterns:a,options:c}=o;return a=g6(a,s),c.ignore=g6(c.ignore,{cwd:n}),{patterns:a,options:c}})},LS=D6(async(t,e)=>{let[r,n]=await Promise.all([A6(t,e),_he(e)]),i=await Promise.all(r.map(s=>(0,pp.default)(s.patterns,s.options)));return S6(i,n)}),wHe=hv((t,e)=>{let r=MS(t,e),n=C6(e),i=r.map(s=>pp.default.sync(s.patterns,s.options));return S6(i,n)}),SHe=hv((t,e)=>{let r=MS(t,e),n=C6(e),i=r.map(o=>pp.default.stream(o.patterns,o.options));return GC(i).filter(o=>n(o))}),THe=hv((t,e)=>t.some(r=>pp.default.isDynamicPattern(r,e))),PHe=D6(A6),AHe=hv(MS),{convertPathToPattern:_He}=pp.default});function dp(t){let e=Date.now();return new Promise((r,n)=>{let s=Fhe(t.url)({protocol:t.url.protocol,host:t.url.host,port:t.url.port,path:t.url.pathname+t.url.search,method:t.method,headers:t.headers},o=>{let a="";o.on("data",c=>{a+=c}),o.on("end",()=>{if((0,F6.debug)(`${t.method} ${t.url.href}, duration: ${Date.now()-e}ms`),typeof o.statusCode=="number"&&o.statusCode>=200&&o.statusCode<300)if(typeof o.headers["content-type"]!="string"||!o.headers["content-type"].includes("application/json"))n(`Response from ${t.url.href} content-type is ${o.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(c){n(`Response from ${t.url.href} is not valid JSON: ${a}
|
|
1237
1237
|
${c}`)}else n(`Request to ${t.url.href} failed with status ${o.statusCode}: ${a}`)})}).on("error",o=>{n(`Error fetching ${t.url.href}, ${o}`)});t.body&&(s.setHeader("Content-Type","application/json"),s.write(t.body)),s.end()})}function Fhe(t){if(t.protocol==="https:")return I6.request;if(t.protocol==="http:")return k6.request;throw new Error(`Unsupported protocol ${t.protocol}`)}var F6,k6,I6,N6=N(()=>{"use strict";h();F6=require("node:console"),k6=require("node:http"),I6=require("node:https")});async function R6(t){let e=new URL(`https://cdn.builder.io/api/v3/query/${t.publicApiKey}/${t.model}`);return e.searchParams.set("omit","meta.componentsUsed"),e.searchParams.set("apiKey",t.publicApiKey),e.searchParams.set("userAttributes.urlPath",t.pageUrl),e.searchParams.set("options.page.model",`"${t.model}"`),e.searchParams.set("cachebust","true"),(await dp({url:e,method:"GET"}))[t.model]}async function O6(t,e){if(e.kind===Gd.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
|
|
1238
1238
|
models {
|
|
1239
1239
|
id
|
|
@@ -1252,7 +1252,7 @@ Restarting server after Builder Devtools update...
|
|
|
1252
1252
|
<h3>How's Devtools working for you?</h3>
|
|
1253
1253
|
<p>We'd love your feedback!</p>
|
|
1254
1254
|
</div>
|
|
1255
|
-
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.17.16"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
|
|
1255
|
+
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.17.17"}highlightOpener(){let e=this.shadowRoot.querySelector(".menu-toggle");e.classList.add("menu-toggle-highlight"),e.classList.add("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight-no-transition"),setTimeout(()=>{e.classList.remove("menu-toggle-highlight")},20)},20)}};var lo=\`<style>*,*:before,*:after{box-sizing:border-box}html,body,:host{position:fixed;top:0;left:0;width:100%;height:100vh;z-index:2147483646;margin:0;padding:0;line-height:1.8;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";background-color:#252525;color:#fff;transition:opacity .25s ease-in-out}:host([aria-hidden="true"]){opacity:0;pointer-events:none}main{position:absolute;top:0;left:0;width:100%;height:100vh}h1{margin-top:0;font-size:24px;font-weight:300;line-height:1.4}p{margin:20px 0;font-weight:300}button{cursor:pointer}aside{position:absolute;top:0;left:0;width:350px;height:100vh;padding:60px 0 0 50px;background-color:#121212}aside ul{margin:30px 0 0;padding:0;list-style:none}aside li{position:relative;margin:0;padding:20px 10px;font-weight:300}aside li.highlight{color:#48a1ff}aside li.active{font-weight:700}aside li .circle{position:absolute;top:20px;left:10px;width:24px;height:24px;border:3px solid white;border-radius:50%;font-size:14px}aside li.highlight .circle{border-color:#48a1ff}aside li.active .circle:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background-color:#48a1ff}aside li.completed .circle{background-color:#48a1ff}aside li.completed .circle:after{content:"";position:absolute;top:2px;left:6px;width:6px;height:13px;border:3px solid black;border-top:none;border-left:none;transform:rotate(45deg)}aside li .line{position:absolute;top:44px;left:21px;width:3px;height:45px;background-color:#fff}aside li.completed .line{background-color:#48a1ff}aside li span{display:block;margin-left:44px}nav{margin-top:30px}section{position:absolute;top:135px;left:350px;padding:0 80px 0 140px;transition:opacity .15s ease-in-out}section[aria-hidden=true]{pointer-events:none;opacity:0}section h1,section p{min-width:300px;max-width:600px}.button{position:relative;display:inline-block;color:#fff;background-color:#48a1ff;border-radius:4px;text-decoration:none;padding:10px 40px 10px 20px;white-space:nowrap}.button:hover{background-color:#48a1ffd9}#button-icon{position:absolute;top:1px;right:5px;bottom:0;width:30px;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="white" stroke-linecap="square" stroke-miterlimit="10" stroke-width="48" d="M184 112l144 144-144 144"/></svg>');background-repeat:no-repeat;background-position:center;background-size:24px 24px}.button[aria-disabled=true]{opacity:.9;background-color:#ffffff4d;pointer-events:none;padding-right:60px}.button[aria-disabled=true] #button-icon{top:21px;right:29px;width:8px;height:8px;border-radius:4px;background:#fff;color:#fff;animation:dot-flashing .5s infinite linear alternate;animation-delay:.25s}.button[aria-disabled=true] #button-icon:before,.button[aria-disabled=true] #button-icon:after{content:"";display:inline-block;position:absolute;top:0}.button[aria-disabled=true] #button-icon:before{left:-12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:0s}.button[aria-disabled=true] #button-icon:after{left:12px;width:8px;height:8px;border-radius:4px;background-color:#fff;color:#fff;animation:dot-flashing .5s infinite alternate;animation-delay:.5s}@keyframes dot-flashing{0%{background-color:#fff}50%,to{background-color:#ffffff4d}}.logo{margin-left:9px;background:url('data:image/svg+xml,<svg viewBox="0 0 150 32" fill="none" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(%23clip0_4_304)"> <path d="M27.9858 8.99927C27.9872 10.3415 27.688 11.667 27.1101 12.8783C26.5321 14.0896 25.6902 15.156 24.6462 15.9989V15.9989L0.634502 2.36355C0.542657 2.31119 0.457444 2.24796 0.380701 2.17523C0.260289 2.05715 0.164605 1.91624 0.0992389 1.76075C0.0338732 1.60525 0.000136546 1.43828 0 1.26959C0 0.932873 0.133698 0.609948 0.371683 0.371854C0.609667 0.13376 0.932443 0 1.269 0L18.9906 0C21.3763 0 23.6642 0.948135 25.3512 2.63583C27.0381 4.32352 27.9858 6.61252 27.9858 8.99927V8.99927Z" fill="%2318B4F4" /> <path d="M27.9858 22.9986C27.9861 24.1806 27.7536 25.351 27.3017 26.4431C26.8498 27.5352 26.1873 28.5275 25.352 29.3634C24.5167 30.1993 23.5249 30.8624 22.4335 31.3147C21.342 31.7671 20.1721 32 18.9907 32H1.26906C1.01802 31.9973 0.77343 31.9202 0.566221 31.7784C0.359012 31.6366 0.198499 31.4364 0.104989 31.2034C0.0114791 30.9703 -0.0108254 30.7147 0.0408974 30.4689C0.0926201 30.2231 0.216046 29.9982 0.395559 29.8226V29.8226C0.467112 29.7508 0.547407 29.6882 0.634555 29.6364L10.0844 24.2703L24.6441 16.001C25.688 16.8438 26.53 17.9097 27.1083 19.1206C27.6866 20.3315 27.9864 21.6566 27.9858 22.9986V22.9986Z" fill="%23FD6B3C" /> <path d="M24.6461 15.9989L10.0843 24.2703L0.634458 29.6365C0.54372 29.6868 0.459841 29.7487 0.384888 29.8205C3.98804 26.1233 6.00266 21.1627 5.99812 15.9989C6.0049 10.8346 3.99085 5.87268 0.387003 2.17523C0.463746 2.24796 0.548959 2.31119 0.640803 2.36355L24.6461 15.9989Z" fill="%23A97FF2" /> <path d="M47.6659 11.7352C51.8177 11.7352 54.1632 15.0531 54.1632 19.0714C54.1632 23.0896 51.8177 26.3821 47.6659 26.3821C45.5086 26.3821 43.8589 25.5188 42.9473 24.0545L42.5709 26.052H39.9736V6.77115H43.1884V13.8914C43.971 12.6959 45.5086 11.7352 47.6659 11.7352ZM47.0187 23.5488C49.4446 23.5488 50.9547 21.5809 50.9547 19.0714C50.9547 16.5089 49.4446 14.5664 47.0187 14.5664C44.5928 14.5664 43.0806 16.5047 43.0806 19.0714C43.0806 21.583 44.5653 23.5488 47.0187 23.5488V23.5488Z" fill="white" /> <path d="M65.4595 20.2859V12.0611H68.668V20.123C68.668 23.7202 67.0246 26.3821 62.4943 26.3821C57.9639 26.3821 56.3206 23.7117 56.3206 20.123V12.0611H59.529V20.2859C59.529 22.4696 60.5527 23.5488 62.49 23.5488C64.4274 23.5488 65.4595 22.4696 65.4595 20.2859Z" fill="white" /> <path d="M71.2355 7.74451C71.2247 7.46284 71.2724 7.18199 71.3755 6.91968C71.4787 6.65737 71.6351 6.41929 71.8348 6.22047C72.0345 6.02165 72.2732 5.8664 72.5359 5.76452C72.7986 5.66264 73.0796 5.61633 73.3611 5.62853C74.5793 5.62853 75.4571 6.50666 75.4571 7.75509C75.4571 9.00352 74.5793 9.8224 73.3611 9.8224C72.1428 9.8224 71.2355 8.9612 71.2355 7.74451Z" fill="white" /> <path d="M128.476 7.74451C128.465 7.46376 128.513 7.18383 128.615 6.92227C128.718 6.66071 128.873 6.42315 129.072 6.22449C129.27 6.02583 129.508 5.87035 129.769 5.7678C130.031 5.66524 130.31 5.61783 130.591 5.62852C131.809 5.62852 132.687 6.50666 132.687 7.75509C132.687 9.00352 131.809 9.8224 130.591 9.8224C129.373 9.8224 128.476 8.9612 128.476 7.74451Z" fill="white" /> <path d="M122.302 24.1031C122.291 23.8223 122.339 23.5422 122.441 23.2805C122.543 23.0188 122.699 22.7811 122.897 22.5824C123.096 22.3837 123.334 22.2282 123.595 22.1258C123.857 22.0233 124.137 21.9761 124.417 21.9872C125.636 21.9872 126.513 22.8653 126.513 24.1031C126.513 25.341 125.636 26.1726 124.417 26.1726C123.199 26.1726 122.302 25.3219 122.302 24.1031Z" fill="white" /> <path d="M74.9516 12.059H71.7432V26.0583H74.9516V12.059Z" fill="white" /> <path d="M78.16 26.0583V6.77115H81.3685V26.0626L78.16 26.0583Z" fill="white" /> <path d="M94.6063 6.77115H97.8148V26.0626H95.2239L94.8474 24.0651C93.9591 25.523 92.3094 26.3927 90.131 26.3927C86.0046 26.3927 83.6591 23.0748 83.6591 19.0819C83.6591 15.0891 86.0046 11.7458 90.131 11.7458C92.3137 11.7458 93.8238 12.7149 94.6063 13.902V6.77115ZM90.7993 14.5707C88.3734 14.5707 86.8633 16.5131 86.8633 19.0756C86.8633 21.5851 88.3734 23.553 90.7993 23.553C93.2252 23.553 94.7354 21.5851 94.7354 19.0756C94.7396 16.5047 93.257 14.5664 90.8036 14.5664L90.7993 14.5707Z" fill="white" /> <path d="M113.479 22.2284C112.482 24.7359 110.162 26.3821 107.117 26.3821C102.887 26.3821 100.137 23.225 100.137 19.0439C100.137 14.9706 102.942 11.7353 107.093 11.7353C111.245 11.7353 113.969 14.8902 113.969 18.991C113.982 19.3255 113.953 19.6604 113.883 19.9876H103.288C103.53 22.2009 104.959 23.6292 107.197 23.6292C108.735 23.6292 110.001 22.8738 110.594 21.473L113.479 22.2284ZM103.341 17.6156H110.784C110.513 15.6731 109.166 14.3506 107.089 14.3506C105.012 14.3506 103.665 15.7006 103.341 17.6156V17.6156Z" fill="white" /> <path d="M123.779 14.9452C123.538 14.9117 123.295 14.8933 123.051 14.8902C120.786 14.8902 119.439 16.0772 119.439 18.7751V26.0583H116.23V12.0611H118.821L119.195 14.0014C119.707 13.1127 120.887 11.9257 123.322 11.9257C123.455 11.9257 123.779 11.9532 123.779 11.9532V14.9452Z" fill="white" /> <path d="M132.192 12.059H128.984V26.0583H132.192V12.059Z" fill="white" /> <path d="M134.483 19.0714C134.483 15.1335 137.287 11.7353 141.735 11.7353C146.183 11.7353 149.015 15.1335 149.015 19.0714C149.015 23.0092 146.213 26.3821 141.735 26.3821C137.258 26.3821 134.483 23.0092 134.483 19.0714ZM141.735 23.5488C144.083 23.5488 145.806 21.7692 145.806 19.0714C145.806 16.3735 144.083 14.5664 141.735 14.5664C139.387 14.5664 137.687 16.346 137.687 19.0714C137.687 21.7968 139.417 23.5488 141.735 23.5488V23.5488Z" fill="white" /> </g> <defs> <clipPath id="clip0_4_304"> <rect width="149.015" height="32" fill="white" /> </clipPath> </defs> </svg>');background-repeat:no-repeat;width:150px;height:32px}@media (max-width: 840px){aside{width:250px;padding:60px 0 0 20px}section{left:250px;padding:0 80px}}@media (max-width: 590px){aside{width:230px;padding:60px 0 0 10px}section{left:230px;padding:0 40px}}#modified-files-message a{color:#cbcbcb;font-weight:300;text-decoration:underline}#modified-files-message a:hover{color:#fff;text-decoration:none}#restart-warning{border-radius:4px;padding:8px 16px;border:1px solid #fd6b3c;background:#fd6b3c1a}#react-router-steps{margin:0 0 5px;padding:0 20px}#need-help{color:#48a1ff;text-decoration:none}#router-message{border-radius:4px;padding:16px;border:1px solid #48a1ff}#router-finish-button{margin-top:12px}#router-checkbox-div{display:flex;align-items:center}#router-checkbox{margin-right:10px;width:15px;height:15px}#success-title{display:flex;align-items:center;gap:10px}#success-title .check-icon{display:inline-block;width:24px;height:24px;border:2px solid #28a745;border-radius:50%;position:relative}#success-title .check-icon:before{content:"";position:absolute;top:50%;left:50%;width:6px;height:12px;border:solid #28a745;border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}
|
|
1256
1256
|
</style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
|
|
1257
1257
|
<aside>
|
|
1258
1258
|
<div class="logo"></div>
|
|
@@ -1291,7 +1291,7 @@ Restarting server after Builder Devtools update...
|
|
|
1291
1291
|
</nav>
|
|
1292
1292
|
</section>
|
|
1293
1293
|
</main>
|
|
1294
|
-
\`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.17.
|
|
1294
|
+
\`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.17.17"),document.body.appendChild(t));let e=document.querySelector("builder-dev-tools-edit");e||(e=document.createElement("builder-dev-tools-edit"),document.body.appendChild(e));let r=document.getElementById("builder-dev-tools-style");r||(r=document.createElement("style"),r.id="builder-dev-tools-style",r.innerHTML=".builder-no-scroll{overflow:hidden !important}",document.head.appendChild(r)),li(),Jn()}catch(t){console.error("Builder Devtools:",t)}};window.location===window.parent.location&&(console.debug("Builder.io Devtools v1.17.17"),mo());})();`)}async function W6(t){return J6(t,`<!doctype html>
|
|
1295
1295
|
<html lang="en" dir="ltr">
|
|
1296
1296
|
<head>
|
|
1297
1297
|
<meta charset="utf-8" />
|
|
@@ -1458,7 +1458,7 @@ Restarting server after Builder Devtools update...
|
|
|
1458
1458
|
</body>
|
|
1459
1459
|
</html>
|
|
1460
1460
|
`)}async function J6(t,e){let r=await Mk(t),n=t.getFrameworks();return e.replace(/__LOCAL_APP_ID__/g,r).replace(/__DEV_TOOLS_URL__/g,t.devToolsServerUrl).replace(/__CLIENT_ID__/g,t.getClientId()).replace(/__FRAMEWORK__/g,n.length?n[0].name:"")}var Y6=N(()=>{"use strict";h();dt()});async function Q6(t,e){let r=new URL("/cli-auth","https://builder.io");r.searchParams.set("client_id",t.getClientId()),r.searchParams.set("host",await t.getDeviceId()),r.searchParams.set("response_type","code"),r.searchParams.set("cli","true");let n=new URL(bc,t.devToolsServerUrl);n.searchParams.set(Xh,(0,X6.platform)()),n.searchParams.set(Qh,process.versions.node);let i=t.getFrameworks();return i.length>0&&(r.searchParams.set(ul,i[0].name),n.searchParams.set(ul,i[0].name)),r.searchParams.set("redirect_url",n.href),r.searchParams.set("preview_url",e),r.href}var X6,Z6=N(()=>{"use strict";h();ll();X6=require("node:os")});async function t$(t,e,r,n){try{if(!t)return mp(r,n,400,"Builder context closed");let i=$he(r);if(i.pathname===T0){if(r.method==="POST"){let s=await Lhe(r);if(s)try{let o=await V6(t,JSON.parse(s));return e$(r,n,200,o)}catch(o){t.debug("Dev API Error",o.stack||o.message||o);let a={errors:[String(o.message||o)]};return e$(r,n,500,a)}}else if(r.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version, sentry-trace, baggage"},o=r.headers.origin;o&&o!=="null"?r$(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return mp(r,n,405,`${T0} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(i.pathname===P0)return Ohe(r,n,200,await K6(t));if(i.pathname===rk){let s=i.searchParams.get(S0);return s?Mhe(n,302,await Q6(t,s)):mp(r,n,400,`Missing ${S0} querystring`)}if(i.pathname===bc)return Bhe(r,n,200,await W6(t));if(i.pathname===nk){await zt(t,{_:[]},{});let s=await Qc(t),{figmaBuilderLinks:o,diagnostics:a}=await tm({mappingFiles:s,sys:t});return em(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:o,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return i.pathname===xc?(t.debug(`Close Dev Tools Server Requested: ${i.href}`),setTimeout(()=>{try{e.close(s=>{t.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){t.debug(`Error closing devtools server: ${s}`)}},20),mp(r,n,200,"Closing Dev Tools Server")):mp(r,n,404,"Not found")}catch(i){return t?.Sentry?.captureException(i),mp(r,n,500,`Dev Server Error: ${i}`)}}function e$(t,e,r,n){em(t,e,r,"application/json",JSON.stringify(n))}function Ohe(t,e,r,n){em(t,e,r,"application/javascript",n)}function Bhe(t,e,r,n){em(t,e,r,"text/html",n)}function mp(t,e,r,n){em(t,e,r,"text/plain",n)}function em(t,e,r,n,i){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":Qe},o=t.headers.origin;o&&o!=="null"?r$(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",e.writeHead(r,s),e.end(i)}function r$(t){return t.hostname==="localhost"||t.origin==="https://builder.io"||t.origin==="https://www.builder.io"||t.origin.endsWith(".builder.io")?!0:t.port===""?!1:t.port!=="80"&&t.port!=="443"}function Mhe(t,e,r){t.writeHead(e,{Location:r}),t.end()}async function Lhe(t){let e="";for await(let r of t)e+=r;return e}function $he(t){let e=t.url||"/";return new URL(e,`http://${t.headers.host}`)}var n$=N(()=>{"use strict";h();ll();H6();Y6();Z6();an();hp();kr()});async function i$(t){if(globalThis.__builderDevToolsServer)return t.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(t),globalThis.__builderDevToolsServer;let e=await jhe(t),r=(0,gv.createServer)((i,s)=>{t$(t,r,i,s)}),n=()=>new Promise((i,s)=>{r.listening?(t.debug(`closing devtools server on port ${e}`),r.close(o=>{t=null,o?(t.debug(`error closing devtools server on port ${e}`),s(o)):(t&&t.debug(`closed devtools server on port ${e}`),i())})):(t.debug(`devtools server on port ${e} not listening`),i())});return process.once("SIGTERM",n),process.once("SIGINT",n),process.env.CI!=="true"&&process.stdin.on("end",n),globalThis.__builderDevToolsServer={url:new URL(`http://localhost:${e}`).href,port:e,setContext:i=>{t.debug(`set devtools context on server ${e}`),t=i},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(i=>{r.listen(e,()=>{t.debug(`started devtools server on port ${e}`),i(globalThis.__builderDevToolsServer)})})}function jhe(t){return new Promise(e=>{let r=t.port;try{(0,gv.request)({hostname:"localhost",port:r,path:xc,method:"GET"},i=>{i.on("end",()=>{t.debug(`${xc} - Response ended`),e(r)})}).on("error",i=>{t.debug(`${xc} - No response ${i}`),e(r)}).end()}catch(n){t.debug(`${xc} - Error ${n}`),e(r)}})}var gv,s$=N(()=>{"use strict";h();gv=require("node:http");n$();ll()});async function qS(t){let e={...t,devToolsServerUrl:"",isValid:!1,serverShouldRestart:!1,publicApiKey:"",port:t.port||5273,ignoreMissingConfig:!1,getAllProjectFiles:t.getAllProjectFiles||(()=>Promise.resolve([]))},r=t.getFrameworks().map(s=>s.name).join(", ");e.debug(`create devtools ${a$} [${r}]`);let n=await i$(e);return e.devToolsServerUrl=n.url,e.port=n.port,{getUrl:()=>e.devToolsServerUrl}}var o$=N(()=>{"use strict";h();s$();zS()});var a$,zS=N(()=>{"use strict";h();kr();o$();a$=Qe});async function c$(t){if(console.log(""),Tt((0,ja.bgCyan)((0,ja.bold)((0,ja.white)(" add ")))+" "+(0,ja.dim)(Qe)),!t.path&&!process.stdout.isTTY&&process.env.FORCE_TTY!=="1")return ke(`This command requires a TTY-enabled terminal.
|
|
1461
|
-
If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await be(1);let e=t.snippetId;if(!e&&!t.snippet)return ke("SnippetId expected. npx builder.io add <snippetId>"),await be(1);let r=No(),n=t.snippet||null;if(!n&&e&&(r.start(`Fetching snippet ${e}`),n=await GS(e),r.stop(`Fetched snippet ${e}`)),!n)return ke(`No snippet found for id ${e}`),await be(1);let i=process.cwd(),s=zf(i)??i;if(n.files?.length>0){let o=VS(s,n.framework||"react"),a=t.path||await St({message:"Where should we copy the files?",initialValue:o,validate(u){if(u.length===0)return"File path is required!";if(u[0]!==".")return"Please enter a relative path."}});if(Fe(a))return ke("Cancelled sync"),await be(0);let c=await yv(s,n,n.files,a,!1);return R.success("All files have been written successfully."),{snippet:n,pathInput:a,writtenFiles:c,timeStamp:Date.now()}}else{let{code:o,suggestedName:a,framework:c}=n;c&&(a=await qhe(s,c,o)),a??="./src/components/MyComponent.jsx";let u=u$(n,Uhe(n.code),n.framework);try{n.framework==="html"?u=await hi(s,u,"html",void 0):n.framework==="angular"?u=await hi(s,u,"angular",void 0):n.framework==="vue"?u=await hi(s,u,"vue",void 0):n.framework==="svelte"?u=await hi(s,u,"svelte",void 0):u=await hi(s,u,"typescript",void 0)}catch{}let l=t.path;if(!l){try{let m=(await
|
|
1461
|
+
If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await be(1);let e=t.snippetId;if(!e&&!t.snippet)return ke("SnippetId expected. npx builder.io add <snippetId>"),await be(1);let r=No(),n=t.snippet||null;if(!n&&e&&(r.start(`Fetching snippet ${e}`),n=await GS(e),r.stop(`Fetched snippet ${e}`)),!n)return ke(`No snippet found for id ${e}`),await be(1);let i=process.cwd(),s=zf(i)??i;if(n.files?.length>0){let o=VS(s,n.framework||"react"),a=t.path||await St({message:"Where should we copy the files?",initialValue:o,validate(u){if(u.length===0)return"File path is required!";if(u[0]!==".")return"Please enter a relative path."}});if(Fe(a))return ke("Cancelled sync"),await be(0);let c=await yv(s,n,n.files,a,!1);return R.success("All files have been written successfully."),{snippet:n,pathInput:a,writtenFiles:c,timeStamp:Date.now()}}else{let{code:o,suggestedName:a,framework:c}=n;c&&(a=await qhe(s,c,o)),a??="./src/components/MyComponent.jsx";let u=u$(n,Uhe(n.code),n.framework);try{n.framework==="html"?u=await hi(s,u,"html",void 0):n.framework==="angular"?u=await hi(s,u,"angular",void 0):n.framework==="vue"?u=await hi(s,u,"vue",void 0):n.framework==="svelte"?u=await hi(s,u,"svelte",void 0):u=await hi(s,u,"typescript",void 0)}catch{}let l=t.path;if(!l){try{let m=(await D8({cwd:process.cwd()})).getFrameworks();if(m.length>0){let f;if(m.some(g=>g.name.includes("qwik"))?f="qwik":m.some(g=>g.name.includes("react"))?f="react":f=m[0].name,n.framework&&n.framework!==f){let g=await yr({message:`This snippet is for ${n.framework}, but you are using ${f}. Continue?`,initialValue:!1});if(Fe(g)||!g)return console.log("Please go back to builder and change the output framework to match your project."),console.log(),await be(0)}}}catch{}if(l=await St({message:"Where should we copy the code?",initialValue:a?.startsWith("./")?a:`./${a}`,validate(d){if(d.length===0)return"File path is required!";if(d[0]!==".")return"Please enter a relative path."}}),Fe(l))return console.log(""),await be(0)}let p=(0,ks.resolve)(s,l);R.info(`Writing code to ${p}`),(0,cn.mkdirSync)((0,ks.dirname)(p),{recursive:!0}),(0,cn.writeFileSync)(p,u)}}function GS(t){return ze(`https://cdn.builder.io/api/v1/snippet/${t}`).then(e=>e.status===404?null:e.json())}function Uhe(t){return t.replace(/^```jsx\s?|\s?```$/g,"").trim()}function u$(t,e,r,n=!1){if(!r)return e;let i="This code was generated by Builder.io",s=n?`https://builder.io/content/${t.contentId}?codeSession=${t.sessionKey}&sid=${t.id}`:"",o=["vue","html","svelte"].includes(r.toLowerCase()),a=[i,s].filter(Boolean);return`${o?a.map(u=>`<!-- ${u} -->`).join(`
|
|
1462
1462
|
`):`/**
|
|
1463
1463
|
${a.map(u=>` * ${u}`).join(`
|
|
1464
1464
|
`)}
|
|
@@ -1870,11 +1870,11 @@ ${g?"":"existed with 1 code"}
|
|
|
1870
1870
|
</logs>`:"",v=`
|
|
1871
1871
|
${f}
|
|
1872
1872
|
${y}
|
|
1873
|
-
`.trim();return{isError:!g,toolResult:v,title:"Dev server logs"}}async function wve({readFile:t,stat:e,listDir:r,files:n},{file_path:i,view_range:s}){let o=`Read path "${i}"`;try{let a=await e(i);if(!a)throw new Error(`File or directory not found: ${i}`);if(a.isFile()){o=`Read file "${i}"`,s&&(o+=` (lines ${s[0]} to ${s[1]})`);let c=await t(i);if(c===null)throw new Error(`File not found: ${i}`);let u=
|
|
1873
|
+
`.trim();return{isError:!g,toolResult:v,title:"Dev server logs"}}async function wve({readFile:t,stat:e,listDir:r,files:n},{file_path:i,view_range:s}){let o=`Read path "${i}"`;try{let a=await e(i);if(!a)throw new Error(`File or directory not found: ${i}`);if(a.isFile()){o=`Read file "${i}"`,s&&(o+=` (lines ${s[0]} to ${s[1]})`);let c=await t(i);if(c===null)throw new Error(`File not found: ${i}`);let u=j8(i,c,s);return n.push({filePath:i,content:c,importance:.1,wasIncluded:!0}),{isError:!1,toolResult:u,title:o}}else if(a.isDirectory()){o=`Listing directory "${i}"`;let c=await r(i);return{isError:!1,toolResult:o9({paths:c,maxFilesPerDir:400,maxDepth:2}),title:o}}else throw new Error("Unknown file type")}catch(a){return{isError:!0,toolResult:a instanceof Error?a.message:String(a),title:o}}}async function Sve({listDir:t,fileExists:e,readFile:r,stat:n,files:i},{file_path:s,offset:o,limit:a}){let c=`Read file "${s}"`,u=typeof o=="number"||typeof a=="number";if(o=o??0,a=a??1500,(o>0||a!==1500)&&(c+=` (offset: ${o}, limit: ${a})`),!s)return{isError:!0,toolResult:"No file path provided",title:"Read file"};try{let l=await e(s);if(l.recommendedPath)return{isError:!1,toolResult:`File not found: ${s}, use "${l.recommendedPath}" instead.`,title:c};let p=await n(s);if(!p)throw new Error(`File or directory not found: ${s}`);if(!p.isFile()){let f=await t(s);return{isError:!1,toolResult:`${s.endsWith("/")?s:s+"/"}
|
|
1874
1874
|
${f.map(y=>` ${y}`).join(`
|
|
1875
1875
|
`)}
|
|
1876
1876
|
|
|
1877
|
-
Note: It's recommended to use the "Glob" tool to search for files, since it's recursive and support glob patterns.`,title:c}}if(p.size>1024*1024*1.2)return{isError:!0,toolResult:`File is too large: ${s} (size: ${p.size} bytes). Files this big can not be read (ACL). Do not attempt to read it.`,title:c};let d=await r(s);if(d===null)throw new Error(`File not found: ${s}`);if(d.trim()==="")return{isError:!1,toolResult:"WARNING: File exists but has empty contents.",title:c};let m=$
|
|
1877
|
+
Note: It's recommended to use the "Glob" tool to search for files, since it's recursive and support glob patterns.`,title:c}}if(p.size>1024*1024*1.2)return{isError:!0,toolResult:`File is too large: ${s} (size: ${p.size} bytes). Files this big can not be read (ACL). Do not attempt to read it.`,title:c};let d=await r(s);if(d===null)throw new Error(`File not found: ${s}`);if(d.trim()==="")return{isError:!1,toolResult:"WARNING: File exists but has empty contents.",title:c};let m=$8(d,o,a,u);return i.push({filePath:s,content:d,importance:.1,wasIncluded:!0}),{isError:!1,toolResult:m,title:c}}catch(l){return{isError:!0,toolResult:l instanceof Error?l.message:String(l),title:c}}}async function Tve({listDir:t,stat:e},{path:r}){if(!r)return{isError:!0,toolResult:"No path provided",title:"List directory"};let n=await e(r);if(!n)return{isError:!0,toolResult:`File or directory not found: ${r}`,title:"List directory"};if(!n.isDirectory())return{isError:!0,toolResult:`Path is not a directory: ${r}`,title:"List directory"};let i=await t(r);return i.length===0?{isError:!1,toolResult:"The directory is empty",title:"List directory"}:{isError:!1,toolResult:i.join(`
|
|
1878
1878
|
`),title:`Files in "${r}"`}}async function _5({getAllFiles:t},{pattern:e}){let r=await t({pattern:e});if(r.length>0){if(r.length>200){let n=r.length,i=r.slice(0,100),s=r.slice(-100);r=[...i,"...",...s,"",`List truncated, too many matches (${n}). Please narrow down the search.`]}return{isError:!1,toolResult:r.join(`
|
|
1879
1879
|
`),title:`Files matching "${e}" across workspaces`}}else return{isError:!0,toolResult:`No files found matching glob pattern "${e}". Maybe use the "LS" tool to manually list all files`,title:"Glob search"}}async function Pve(t,{plan:e}){return e?(t.setHasPlanToApply(!0),{isError:!1,toolResult:"Plan has been presented to the user. Waiting for user approval to proceed with implementation. Do not communicate anything to the user after using this tool, just acknowledge that the plan has been presented.",title:"Plan presented"}):{isError:!0,toolResult:"ExitPlanMode tool requires a plan parameter",title:"Exit Plan Mode"}}async function Ave(t){let{rgPath:e}=await import("@lvce-editor/ripgrep");return t.existsSync(e)?e:"rg"}async function kve(t,e){let{signal:r,bashWorkingDirectory:n,sys:i,filterText:s,fusionConfig:o,user:a}=t,c=await Ave(i),u=["--path-separator","/","-A","1","-B","1","--max-columns","300","--json","--multiline","--multiline-dotall","--line-number","-i"],l=n,p=`Grepping codebase with "${e.query}"`,d="";e.include_glob&&(d+=` (including: ${e.include_glob})`),e.exclude_glob&&(d+=` (excluding: ${e.exclude_glob})`,u.push("--glob",`!${e.exclude_glob}`)),_ve.forEach(f=>{u.push("--glob",f)}),p+=d,Fve(e.query)&&u.push("--fixed-strings"),u.push("--",e.query);let m=await Ive(c,u,l,r,e.query,d,p);if(!m.isError&&m.toolResult)try{let f=n9(m.toolResult,o?.accessControl,a.principals,e.include_glob??void 0);if(f)return{...m,toolResult:Sv(s(f),200,300)};if(e.include_glob){let g=await _5(t,{pattern:e.include_glob});if(g.isError){let y=e.include_glob.startsWith("**/")?"Try a wider Grep without include_glob.":`Try a wider Grep with **/${e.include_glob}`;return{isError:!0,toolResult:`Zero files read, include_glob: "${e.include_glob}" is too restrictive. ${y}`,title:g.title}}else return{isError:!0,toolResult:`No matches found for pattern: "${e.query}" ${d||""}`,title:g.title}}return{isError:!0,toolResult:`No matches found for pattern: "${e.query}" ${d||""}`,title:m.title}}catch(f){return{isError:!0,toolResult:`Error processing search results: ${f instanceof Error?f.message:String(f)}`,title:m.title}}return m}async function Ive(t,e,r,n,i,s,o){return new Promise(a=>{let c=new Ti(1e4),u=c1({command:t,args:e,options:{env:process.env,cwd:r,stdio:["ignore","pipe","pipe"],signal:n}});u.stdout.on("data",l=>{c.write(l.toString())}),u.stderr.on("data",l=>{c.write(l.toString())}),u.on("error",l=>{a({isError:!0,toolResult:`Failed to start ripgrep process: ${l.message}`,title:o})}),u.on("close",l=>{let p=c.getContent();l==null?a({isError:!0,toolResult:`The process was aborted while grepping for pattern: "${i}" ${s||""}`,title:o}):l===0?a({isError:!1,toolResult:p,title:o}):l===1?a({isError:!0,toolResult:`No matches found for pattern: "${i}" ${s||""}`,title:o}):(eT.captureException(new At("Fatal ripgrep error",{cause:new At(p)}),{contexts:{ripgrep:{exitCode:l,cwd:r,rgPath:t,args:e}}}),a({isError:!0,toolResult:`There was a fatal error when grepping for pattern: "${i}"
|
|
1880
1880
|
|
|
@@ -1904,7 +1904,7 @@ The Agent found important files which content must be read. Use the "Read" tool
|
|
|
1904
1904
|
|
|
1905
1905
|
Payload size: ${x.totalSizeMB}MB. Top contributors:
|
|
1906
1906
|
${b.join(`
|
|
1907
|
-
`)}`)}let E=new Error(D);throw E.name=`BadStatus${f.status}`,E}let g=xv(f.body),y=
|
|
1907
|
+
`)}`)}let E=new Error(D);throw E.name=`BadStatus${f.status}`,E}let g=xv(f.body),y=4e4;m=setTimeout(()=>{if(!n.aborted){let v=new Error("HTTP Stream Hang");v.name="HTTPStreamHang",i.abort(v)}},y);for await(let v of g)if(c=performance.now(),p+=v.length,clearTimeout(m),m=setTimeout(()=>{if(!n.aborted){let D=new Error("HTTP Stream Broke");D.name="HTTPStreamBroke",i.abort(D)}},y),v.length!==0){d.push(v),d=d.slice(-10);try{let D=JSON.parse(v);D.type==="ping"&&(u=performance.now()),l=!0,yield D}catch(D){t.Sentry?.captureException(D,{extra:{value:v},tags:{operation:"codegen-stream"}})}}}catch(f){let g=performance.now();if(f instanceof Error&&f.name==="AbortError"||f instanceof Error&&f.name==="HTTPStreamBroke"||f instanceof Error&&f.name==="HTTPStreamHang"||f instanceof Error&&f.name==="BadStatus403"||f instanceof As){if(f instanceof Error&&f.name==="HTTPStreamBroke"){let E=u!==void 0?g-u:void 0;t.Sentry?.setContext("brokenStreamInfo",{timeSinceLastPing:E,lastMessageElapsed:g-c,totalElapsed:g-a,responseSize:p,didStream:l,lastEvents:d})}throw f}if(f instanceof qt)throw f;let y=f instanceof Error?f.name:"UnknownError",v=new At(`codegen/completion endpoint: ${y}`,{cause:f}),D=zq(r,s);throw t.Sentry?.captureException(v,{tags:{operation:"codegen-stream"},extra:{bodySize:s.length,responseSize:p,attachments:r.attachments?.length??0,files:r.files?.length??0,toolResults:r.toolResults?.length??0,didStream:l,lastMessageElapsed:g-c,totalElapsed:g-a,lastEvents:d,payloadBreakdown:D}}),v}finally{clearTimeout(m)}}async function Gq(t,e,r,n){let i,o=JSON.stringify(n);for(let a=0;a<3;a++){try{let c=new URL(`${tt}${r}`);e.builderPublicKey&&c.searchParams.set("apiKey",e.builderPublicKey),e.userId&&c.searchParams.set("userId",e.userId);let u={"Content-Type":"application/json"};e.builderPrivateKey&&(u.Authorization=`Bearer ${e.builderPrivateKey}`);let l=await ze(c,{method:"POST",body:o,keepalive:!0,headers:u,signal:AbortSignal.timeout(3e4)});if(l.ok)return!0;throw new Error(`Bad Status: ${l.status}`)}catch(c){c instanceof qt&&vn(c),i=c}a<2&&await n1(a)}return i&&t.Sentry?.captureException(i),!1}async function Vq(t,e,r,n){let i,o=JSON.stringify(r);for(let a=0;a<2;a++){try{let c=new URL(`${tt}/codegen/sessions/set-last-completion`);e.builderPublicKey&&c.searchParams.set("apiKey",e.builderPublicKey),e.userId&&c.searchParams.set("userId",e.userId);let u={"Content-Type":"application/json"};e.builderPrivateKey&&(u.Authorization=`Bearer ${e.builderPrivateKey}`);let l=await ze(c,{method:"POST",body:o,keepalive:!0,headers:u,signal:AbortSignal.timeout(3e4)});if(l.ok)return!0;throw new Error(`Bad Status: ${l.status}`)}catch(c){c instanceof qt&&vn(c),i=c}a<1&&await n1(a)}return i&&t.Sentry?.captureException(i),!1}async function aP(t,e,r,n,i){try{let s=new URL(`${tt}/codegen/sessions/${r}/turns`);e.builderPublicKey&&s.searchParams.set("apiKey",e.builderPublicKey),e.userId&&s.searchParams.set("userId",e.userId),s.searchParams.set("linear",String(n)),i&&s.searchParams.set("completionIdCursor",i);let o={"Content-Type":"application/json"};return e.builderPrivateKey&&(o.Authorization=`Bearer ${e.builderPrivateKey}`),await(await ze(s,{method:"GET",headers:o,keepalive:!0,signal:AbortSignal.timeout(1e4)})).json()}catch(s){return s instanceof qt&&vn(s),t.Sentry?.captureException(s),{turns:[],sessionId:r,initialUrl:void 0,beforeCommit:void 0,title:void 0,createdUnixTime:void 0,updatedUnixTime:void 0,allIds:[],lastCompletionId:void 0,canLoadMore:!1}}}async function MEe({sys:t,projectDir:e,currentDir:r,rootDir:n}){let i=[];async function s(p,d,m=""){try{if(!await t.exists(p))return;let f=await t.readdir(p);for(let g of f){let y=t.join(p,g),v=await t.stat(y).catch(()=>null);if(v)if(v.isDirectory()){let D=m?`${m}/${g}`:g;await s(y,d,D)}else await o(y)}}catch{}}async function o(p){let d=!1;try{d=(await t.stat(p)).isFile()}catch{d=!1}try{if(d){let m=t.relative(e,p),f=await t.readFile(p);if(f){let g=I$(f,m);i.push(g)}}}catch(m){t.Sentry?.captureException(m)}}async function a(p){let d=!1;try{d=(await t.stat(p)).isFile()}catch{d=!1}try{if(d){let m=await t.readFile(p),f=t.relative(e,p);if(m){let g="hash-"+await t.hash(m);i.push({id:g,name:f,content:m,filePath:f})}}}catch(m){t.Sentry?.captureException(m)}}let c=[".cursor/rules",".builder/rules"],u=[".cursorrules",".builderrules",".windsurfrules",".github/copilot-instructions.md"],l;do{try{for(let p of c){let d=t.resolve(r,p);await t.exists(d)&&await s(d,d)}}catch(p){console.debug(`Error reading ${r}:`,p)}for(let p of u)await a(t.resolve(r,p));if(l=r,r=t.dirname(r),r===l)break}while(l!==n);return i}async function lP(t,e){let r=await t.getRepoInfo(e),n={client:"@builder.io/dev-tools",clientVersion:t.version,nodeVersion:process.version,frameworks:t.getFrameworks().map(i=>i.name),systemPlatform:process.platform,systemEOL:Nb.default.EOL,systemArch:Nb.default.arch(),inGitRepo:!!r.remoteUrl};try{let i=Nb.default.userInfo();n.systemShell=i.shell??void 0}catch{}return n}function Jq(){let t=!1,e=[],r,n;i();function i(){n=new Promise(c=>r=c)}async function*s(){await n;let c=e.shift();c&&(yield c),t||(yield*s())}function o(c){e.push(c),r(),i()}function a(){t=!0,r()}return[s(),o,a]}function $Ee(t,e){return t.split(e).length-1}function Yq(t){return t.endsWith("CLAUDE.md")||t.endsWith("AGENT.md")||t.endsWith("AGENTS.md")}function jEe(t){let e=$Ee(t,"/");return Yq(t)||e<2&&t.endsWith("package.json")||t.endsWith("Podfile")||t.endsWith("Cartfile")||e<2&&t.endsWith("global.css")||e<2&&t.endsWith("tailwind.config.ts")||e<2&&t.endsWith("tailwind.config.js")||t.endsWith("libraries.toml")}function UEe(t){return t?[/ERROR[ ]in\b/i,/(\b|^)failed to compile\b/i,/(\b|^)Internal server error\b/i,/(\b|^)Error when evaluating SSR module virtual\b/i,/(\b|^)ReferenceError: \w* is not defined\b/i,/(\b|^)Found \d+ errors?\./i,/(\b|^)error TS\d+\b/i,/(\b|^)Module build failed\b/i,/(\b|^)Build failed\b/i,/(\b|^)\[Error:.*\]/i,/(\b|^)uncaughtException: /i].some(r=>r.test(t)):!1}async function Xq(t,e){try{let r=t.resolve(t.cwd(),e);if(!await t.exists(r))throw new Error(`Workspace file not found: ${e}`);let n=await t.readFile(r);if(!n)throw new Error(`Failed to read workspace file: ${e}`);let i=JSON.parse(n);if(!i.folders||!Array.isArray(i.folders))throw new Error('Invalid workspace configuration: missing "folders" array');let s=t.dirname(r);return{workspace:i,workingDirectory:s}}catch(r){throw console.error(`Error loading workspace: ${r instanceof Error?r.message:String(r)}`),r}}function Hq(t,e){return{...e,maxCompletions:Math.max(t.maxCompletions??uP,e.maxCompletions??uP),userPrompt:t.userPrompt+`
|
|
1908
1908
|
|
|
1909
1909
|
`+e.userPrompt,files:Array.from(new Set([...t.files??[],...e.files??[]])),includeBaseFiles:t.includeBaseFiles,skipSearch:e.skipSearch}}function qEe(){let t=setInterval(()=>{},1073741824);return()=>clearInterval(t)}function zEe(t){let e=t.trim().split(/\s+/).filter(Boolean),r=Number.parseInt(e[0]??"",10),n=Number.parseInt(e[1]??"",10);return{ahead:Number.isFinite(r)?r:0,behind:Number.isFinite(n)?n:0}}function GEe(t,e){let r=[];function n(i){let s=r.findIndex(o=>o.key===i.key);s>=0?r[s]=i:r.push(i)}for(let i of t)n(i);for(let i of e)n(i);return r}function VEe(t){return typeof t=="boolean"?{pullFirst:t}:t}function Fm(t){if(t instanceof Error){let e=`${t.message}`;return t.cause instanceof Error&&(e+=`
|
|
1910
1910
|
=======
|
|
@@ -1951,7 +1951,7 @@ ${y}
|
|
|
1951
1951
|
`);let w={devServerState:o,setupState:n,httpServerState:p,proxyServer:l,devCommand:s,setupCommand:c,hasMergeConflict:i,logs:y,prompt:E,message:D},F=!this.#c&&kEe.includes(e.state);return{actionButtonText:b,type:"build-error",level:x,canAutoApply:F,healthStatus:w,message:w.message,userMessage:{userPrompt:w.prompt,skipSearch:!0,repair:!0,category:C,displayPrompt:w.message}}}}async#be(){let e;if(this.#t?.git)try{if(R.info("\u{1F504} Initializing Fusion session for AI side-car branch workflow..."),e=await this.#e.getRepoInfo(this.#a),!e.hasGit)if(this.#t.gitAutoInit){R.warn("\u{1F6E0}\uFE0F No git repository detected. Initializing a new git repository...");try{await this.git(["init"]),await this.git(["add","."]),await this.git(["branch","-M","main"]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Initial commit for Fusion workflow"]),R.info("\u2705 Successfully initialized a new git repository")}catch(r){console.error("\u274C Failed to initialize git repository:",r);return}}else{R.error("\u274C Error: Not in a git repository. Fusion requires a git repository.");return}return await Gv({sys:this.#e,gitWorkingDirectory:this.#a,strict:!0})}catch(r){R.error(`\u274C Error initializing Fusion session: ${r}`);let n=new Error("Initialize Git failed",{cause:r});throw this.#e.Sentry?.captureException(n,{level:"fatal",tags:{operation:"codegen-initialize-session"},extra:{repoInfo:e}}),n}return{featureBranch:void 0,sessionId:void 0,currentCommitHash:void 0}}async#xe(e){try{await this.git(["checkout",e])}catch{await this.git(["checkout","-b",e])}}async#De(e){if(this.#t?.git){if(!this.#R){let o=O5(this.getFeatureBranch(),e.sessionId);this.#R=o}let r=await this.getCurrentBranch(),n=this.getAiBranch();r!==n&&await this.#xe(n);try{await this.git(["branch","--set-upstream-to",`refs/remotes/origin/${this.#Y()}`])}catch{}let i=ia(e.turns),s=i?.afterCommit??i?.lastCommit;if(s){let o=await this.getCurrentCommitHash();o!==s&&this.#e.Sentry?.captureException(new Error("Init: After commit mismatch"),{tags:{operation:"codegen-initialize-session"},extra:{sessionId:e.sessionId,targetCommit:s,lastTurn:i,currentCommitHash:o}})}if(e.beforeCommit)try{await this.git(["rev-parse","--quiet","--verify",e.beforeCommit])}catch(o){this.#e.Sentry?.captureException(new Error("Init: Before commit not found",{cause:o}),{tags:{operation:"codegen-initialize-session"},extra:{sessionId:e.sessionId,beforeCommit:e.beforeCommit,turnStates:e.turns.length,lastCompletionId:ia(e.turns)?.completionId}})}}}async#Ee(e,r){let n;try{n=(await this.git(["remote","get-url","origin"],r)).trim()}catch{}try{new URL(e)}catch{throw this.#e.Sentry?.captureException(new Error("Provided remote url is invalid"),{tags:{operation:"codegen-git"},extra:{url:e,currentOriginUrl:n}}),new Error("Provided remote url is invalid")}n!==e&&(this.#j=void 0,n?await this.git(["remote","set-url","origin",e],r):await this.git(["remote","add","origin",e],r))}async pushRepoV2(e){return await this.pushChanges({pullFirst:!1,updateRepo:e,refreshRemote:!0})}async#ue(){let e;try{let r=this.gitEnabledFolder;if(!r)throw new Error("Main repo not found");if(r.initializationCommand||r.repoUrl?.startsWith("ssh://"))return{success:!0,message:"Git remote URLs update not needed"};if(!this.#C)throw new Error("Project ID is required to update git URLs");let i=await bp(this.#u,this.#C);if(!i.success)throw i.error;if(e=i.gitConfigs,!r.repoName)throw new Error("Main repo not found");let s=e?.[r.repoName];if(s?.url){let o=this.#e.resolve(this.#s,r.path);await this.#Ee(s.url,o)}return await this.emitGitStatus(),{success:!0,message:"Git remote URLs updated"}}catch(r){let n=`Failed to update git remote URLs: ${Fm(r)}`;return this.#o&&console.error(n),this.#r.emit("step",{type:"error",message:n,code:"git-update-error"}),this.#e.Sentry?.captureException(r,{tags:{operation:"codegen-git",endpoint:"updateGitUrls"},extra:{projectId:this.#C,workspaceFolders:this.#i?.folders,gitConfigs:e}}),{success:!1,message:n,error:r instanceof Error?r:new Error(n)}}}async zipFolder(e){let{resolvedPath:r}=this.resolveWorkspacePath(e,!1),n=Date.now(),i=Math.random().toString(36).substring(2,8),s=`zip-${n}-${i}.zip`,o="/tmp",a=this.#e.join(o,s);return _m.default.mkdirSync(o,{recursive:!0}),await Xo("zip",["-r",a,".","-x","**/node_modules/**"],{cwd:r,debug:this.#o,sys:this.#e}),a}async archiveProject(){if(!this.#t?.git)throw new Error("Can not archive project in non git mode");try{let e=Date.now(),r=Math.random().toString(36).substring(2,8),n=`project-${e}-${r}.zip`,i="/tmp",s=this.#e.join(i,n);return _m.default.mkdirSync(i,{recursive:!0}),await this.git(["archive","--format=zip","-o",s,"HEAD"]),s}catch(e){throw new Error("Failed to archive project",{cause:e})}}isIdle(){let e=this.getSessionContext(),r=["generating","replay"];return!this.#_&&!r.includes(e.state)&&this.#h.length===0}async needsBackup(){if(!this.#t?.git||!this.#C||!this.#H)return!1;let e=await this.getCurrentCommitHash();if(!e)return!1;let r=this.gitEnabledFolder?.originalRepoUrl;if(!r)return!1;let n=cm({version:"v2",originalRepoUrl:r,commitHash:e});return this.#j!==n}async uploadBackup(e=!1){try{let r=this.#C,n=this.#H;if(!this.#t?.git)throw new Error("Cannot upload backup in non-git mode");if(!r)throw new Error("Project ID is required for backup upload");if(!n)throw new Error("Branch ID is required for backup upload");let i=this.getAiBranch(),s=this.getFeatureBranch(),o=await this.#pe(()=>Ev({sys:this.#e,credentials:this.#u,projectId:r,branchName:n,repoPath:this.#a,aiBranch:i,featureBranch:s,workspace:this.#i,debug:this.#o,isConnectedToProvider:!0,forcedFullBackup:e,canAbortMerge:this.#W}));return o.success&&(this.#j=o.backupRef),o}catch(r){if(console.error("Failed to upload backup",r),this.#j=void 0,this.#e.Sentry?.captureException(r,{tags:{operation:"codegen-backup",backupError:""}}),r instanceof Error&&r.message.includes("Commit(s) not found on remote"))throw r instanceof Error?r:new Error(String(r));return{success:!1,error:r instanceof Error?r:new Error(String(r))}}}getCommitMode(){return this.#n?.commitMode??"prs"}#Y(){return this.getCommitMode()==="commits"?`${this.getFeatureBranch()}`:`${this.getAiBranch()}`}async#Ce(e){let r=this.getCommitMode(),n=this.#Y(),i=await this.getCurrentBranch();return r==="commits"?["push","--no-verify","--set-upstream",...e?["-f"]:[],"origin",`${i}:${n}`]:["push","--no-verify","--set-upstream",...e?["-f"]:[],"origin",n]}async#we(){try{let e=this.getSessionContext(),r=Array.from(this.#te);if(this.#te.clear(),r.length===0||!e.prettierConfig)return!1;for(let n of r){let i=await this.#e.readFile(n);if(!i)continue;let s=await hi(this.#s,i,void 0,n);await this.#e.writeFile(n,s)}if(this.#t?.git){if(await this.isCleanWorkTree())return!1;await this.manualCommit({add:".",commitMessage:"Prettier format pending files"})}return!0}catch(e){return this.#e.Sentry?.captureException(new Error("Failed to format pending files",{cause:e})),!1}}async pushChanges(e){let{pullFirst:r,updateRepo:n,actor:i,refreshRemote:s,forcePush:o}=VEe(e);try{if(!this.#t?.git)throw new Error("Can not push changes in non-git mode");if(n){let u=this.#i?.folders.find(l=>l.enableGit);u&&(u.repoName=n.repoFullName,u.originalRepoUrl=n.repoUrl)}if(s||n){let u=await this.#ue();if(!u.success)throw u.error}if(await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");await this.#we(),r&&await this.pullLatestFromRemote({requestRefresh:!1});let a=await this.#Ce(o??!r);await this.git(a);let c=await this.emitGitStatus();return await this.#I({lastCommit:c?.currentCommit}),{success:!0}}catch(a){this.#e.Sentry?.captureException(a,{tags:{operation:"codegen-git",endpoint:"pushChanges",actor:i},extra:{pullFirst:r,commitMode:this.getCommitMode(),updateRepo:n,refreshRemote:s}});let c=Fm(a);return{success:!1,message:c,error:a instanceof Error?a:new Error(c)}}}async pullLatestFromRemote(e){let r=this.#Y();return await this.#le({branches:[r],allowUnrelatedHistory:!1,canPush:!1,uncommittedChanges:"stash",fastForward:this.getCommitMode()==="commits"?"auto":"never",requestRefresh:e?.requestRefresh??!0})}async abortMerge(e=!0){try{return await this.git(["merge","--abort"]),e&&await this.emitGitStatus(),this.requestRefresh(),{success:!0,message:"Merge aborted"}}catch(r){await this.emitGitStatus();let n=Fm(r);return{success:!1,message:n,error:r instanceof Error?r:new Error(n)}}}async syncChangesFromRemote(e){let r=[],n=e?.remoteBranches??"both";return n==="both"?r.push(this.getAiBranch(),this.getFeatureBranch()):n==="main"?r.push(this.getFeatureBranch()):n==="ai"&&r.push(this.getAiBranch()),await this.#le({branches:r,allowUnrelatedHistory:e?.allowUnrelatedHistory??!0,canPush:e?.canPush??!1,uncommittedChanges:e?.uncommittedChanges??"stash",fastForward:e?.fastForward??(this.getCommitMode()==="commits"?"auto":"never")})}async#k(){try{return await this.git(["rev-parse","-q","--verify","MERGE_HEAD"]),!0}catch{return!1}}async#le({branches:e,allowUnrelatedHistory:r,canPush:n,fastForward:i,uncommittedChanges:s,requestRefresh:o=!0}){try{if(!this.#t?.git)throw new Error("Can not pull changes in non-git mode");if(!e.length)throw new Error("At least one branch name is required");let a=await this.getCurrentBranch(),c=this.getAiBranch();if(a!==c)throw new Error(`Sync failed, we are not in AI branch, current branch: ${a} != ${c}`);if(await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");if(!await this.isCleanWorkTree())switch(s){case"stash":await this.git(["stash","--include-untracked"]);break;case"commit":await this.git(["add","."]),await this.git(["commit","-m","Uncommited changes made outside Fusion"]);break;default:throw new Error("Uncommitted changes detected, please commit or stash them before syncing")}await this.git(["fetch","origin","--prune"]);let p=await this.git(["for-each-ref","refs/remotes/origin"]),d=e.filter(m=>p.includes(`refs/remotes/origin/${m}`));for(let m of d)if(m!==c&&!m.startsWith("ai_")&&await this.git(["update-ref",`refs/heads/${m}`,`refs/remotes/origin/${m}`]),await this.git(["merge",...i==="never"?["--no-ff"]:[],...i==="required"?["--ff-only"]:[],...r?["--allow-unrelated-histories"]:[],`refs/remotes/origin/${m}`]),await this.#k())throw await this.emitGitStatus(),new Error("Merge conflict detected, please resolve the conflict and try again");if(n){let m=await this.pushChanges(!1);if(!m.success)throw m.error}else{let m=await this.emitGitStatus();await this.#I({lastCommit:m?.currentCommit})}return o&&this.requestRefresh(),{success:!0,message:`Successfully merged ${e.join(", ")} into current branch`}}catch(a){await this.emitGitStatus(),this.#e.Sentry?.captureException(a,{tags:{operation:"codegen-git",endpoint:"syncChangesFromBranches"},extra:{branches:e,allowUnrelatedHistory:r}});let c=Fm(a);return{success:!1,message:c,error:a instanceof Error?a:new Error(c)}}}async getCurrentCommitHash(e="HEAD"){if(this.#t?.git)try{return(await this.git(["rev-parse",e])).trim()}catch{return}}async getCurrentBranch(){return(await this.git(["branch","--show-current"])).trim()}getFeatureBranch(){if(!this.#N)throw new Error("Feature branch is missing");return this.#N}getAiBranch(){if(!this.#R)throw new Error("AI branch is missing");return this.#R}async git(e,r){if(!this.#t?.git)throw new Error("Can not execute git command in non-git mode.");let n=e[0],i=n==="push"||n==="fetch"||n==="pull",s=Date.now(),o=s-this.#ce,c=1e3*60;return i&&o>10*c&&(this.#ce=s,await this.#ue()),await this.#pe(()=>this.#Se(e,r))}#pe(e){let r=this.#ne.then(()=>e());return this.#ne=r.catch(()=>{}),r}async#Se(e,r){if(!this.#t?.git)throw new Error(`Can not execute git command in non-git mode: git ${e.join(" ")}`);let n=`git ${e.join(" ")}`;this.#_&&this.#e.Sentry?.captureException(new Error(`currentGitCommand is not finished yet. Current command: ${this.#_}, New command Received: ${n}`),{tags:{operation:"codegen-git"},extra:{oldCommand:this.#_,newCommand:n}});try{return this.#_=n,await Xo("git",e,{cwd:typeof r=="string"?r:this.#a,debug:this.#o,sys:this.#e,timeout:60*1e3,...typeof r=="object"?r:void 0})}finally{this.#_=void 0}}setDebug(e){this.#o=e}async createTerminal(e){let r=this.#t?.devServerOrchestrator,n=e?.terminalId||`pty_${Date.now()}_${(0,cP.randomUUID)()}`,i=this.#re().find(b=>b.terminalId===n);if(i)return i;let s=Q1(this.#e);if(!s)throw new Error("Could not import node-pty");let o=e?.shell||(process.platform==="win32"?"powershell.exe":process.env.SHELL||"/bin/bash"),a=e?.cols??120,c=e?.rows??30,u={...process.env,...r?.envVars,...e?.env},l=e?.cwd||this.#m,p=s.spawn(o,[],{name:"xterm-color",cwd:l,cols:a,rows:c,env:u}),d=new Set,m=new Set,f=[],g=b=>{for(let C of d)C(b)},y=p.onData(g);f.push(()=>{try{y?.dispose?.()}catch{}});let v=({exitCode:b})=>{for(let C of m)C(b);this.#p.delete(n),f.forEach(C=>C())},D=p.onExit(v);f.push(()=>{try{D?.dispose?.()}catch{}});let E=Date.now(),x={terminalId:n,title:e?.title||`Terminal ${this.#p.size+1}`,cwd:l,createdAt:E,lastWrittenAt:E,createdBy:e?.createdBy||"unknown",readonly:!1,builtIn:!1};return this.#p.set(n,{...x,pty:p,onDataListeners:d,onExitListeners:m,disposeFns:f,env:e?.env,shell:o}),(e?.emitTerminals??!0)&&this.emitTerminals(),x}#re(){let e=this.getSessionContext(),r=Array.from(this.#p.values()).map(i=>({terminalId:i.terminalId,title:i.title,cwd:i.cwd,createdAt:i.createdAt,lastWrittenAt:i.lastWrittenAt,createdBy:i.createdBy,readonly:i.readonly,builtIn:i.builtIn}));this.#$?.includes("Bash")&&r.unshift({terminalId:"bash-tools",title:"Bash",cwd:this.#m,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!0,builtIn:!0});let n=this.#t?.devServerOrchestrator;return n&&r.unshift({terminalId:"dev-command",title:"Dev Command",cwd:this.#m,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!n.devCommandProcess?.write,builtIn:!0},{terminalId:"setup-command",title:"Setup Command",cwd:this.#m,createdAt:e.createdUnixTime,lastWrittenAt:Date.now(),createdBy:"fusion",readonly:!0,builtIn:!0}),r}emitTerminals(){this.#r.emit("step",{type:"terminals",terminals:this.#re()})}updateTerminal({terminalId:e,cols:r,rows:n,title:i}){if(e==="dev-command"){if(r||n){let o=this.#t?.devServerOrchestrator;if(o?.devCommandProcess?.resize)return o.devCommandProcess.resize(r,n),!0}return!1}let s=this.#p.get(e);return s?((r||n)&&s.pty.resize(r??s.pty.cols,n??s.pty.rows),i&&(s.title=i,this.emitTerminals()),!0):!1}writeTerminal({terminalId:e,data:r}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;return i?.devCommandProcess?.write?(i.devCommandProcess.write(r),!0):!1}let n=this.#p.get(e);return!n||n.readonly?!1:(n.pty.write(r),n.lastWrittenAt=Date.now(),!0)}signalTerminal({terminalId:e,signal:r}){if(e==="dev-command"){let i=this.#t?.devServerOrchestrator;return i?.devCommandProcess?.kill?(i.devCommandProcess.kill(r),!0):!1}let n=this.#p.get(e);if(!n||n.readonly)return!1;try{process.platform==="win32"?n.pty.kill():(r==="SIGINT"&&n.pty.write(""),n.pty.kill(r))}catch{}return!0}disposeTerminal({terminalId:e,emitTerminals:r=!0}){let n=this.#p.get(e);if(!n)return!1;try{n.pty.kill()}catch{}return n.disposeFns.forEach(i=>{try{i()}catch{}}),n.onDataListeners.clear(),n.onExitListeners.clear(),n.disposeFns=[],this.#p.delete(e),r&&this.emitTerminals(),!0}async restartTerminal({terminalId:e}){if(e==="dev-command"){let o=this.#t?.devServerOrchestrator;if(o)try{return await o.restart(),!0}catch(a){return this.#e.Sentry?.captureException(a),!1}return!1}if(e==="setup-command"){let o=this.#t?.devServerOrchestrator;if(o)try{return await o.runSetupCommand(),!0}catch(a){return this.#e.Sentry?.captureException(a),!1}return!1}if(e==="bash-tools")return!1;let r=this.#p.get(e);if(!r)return!1;let n={onDataListeners:new Set(r.onDataListeners),onExitListeners:new Set(r.onExitListeners)},i={terminalId:e,title:r.title,cwd:r.cwd,env:r.env,shell:r.shell,cols:r.pty.cols,rows:r.pty.rows,createdBy:r.createdBy,emitTerminals:!1};this.disposeTerminal({terminalId:e,emitTerminals:!1}),await this.createTerminal(i);let s=this.#p.get(e);return s?(n.onDataListeners.forEach(o=>{s.onDataListeners.add(o)}),n.onExitListeners.forEach(o=>{s.onExitListeners.add(o)}),this.emitTerminals(),!0):!1}subscribeTerminal({terminalId:e,onData:r,onExit:n}){if(e==="dev-command"){let s=this.#t?.devServerOrchestrator;if(s){let o=s.getDevWrite();o&&r(o)}return this.#r.on("step",o=>{o.type==="stdio"&&o.source==="run-command"&&r(o.content)}),!0}if(e==="setup-command"){let s=this.#t?.devServerOrchestrator;if(s){let o=s.getSetupOutput();o&&r(o)}return this.#r.on("step",o=>{o.type==="stdio"&&o.source==="setup-command"&&r(o.content)}),!0}if(e==="bash-tools")return this.#r.on("step",s=>{s.type==="stdio"&&s.source==="tool-command"&&r(s.content)}),!0;let i=this.#p.get(e);if(!i)throw new Error("Terminal not found");return i.onDataListeners.add(r),n&&i.onExitListeners.add(n),i.pty.write(`clear
|
|
1952
1952
|
`),!0}async getAllFiles(e={}){let{getDotFiles:r=!1,globbyPattern:n="**/*",includePattern:i,gitignore:s}=e,o=this.#n?.accessControl,a=o?.entries?.filter(l=>l.action==="allow"&&l.permissions.includes("list")).map(l=>l.resource)??[];if(!this.#i?.folders?.length)return Zc({basePath:this.#s,globPattern:[i??n,...a],extraIgnorePatterns:h1(o).deny,dot:r,gitignore:s,sys:this.#e});let c=[],u=await this.#e.readdir(this.#s);for(let l of u)Yq(l)&&c.push(l);!c.includes("AGENTS.md")&&this.#i.agentsMD&&c.push("AGENTS.md");for(let l of this.#i.folders){let p=this.#e.resolve(this.#s,l.path),d=await Zc({basePath:p,globPattern:[n,...a],dot:r,gitignore:s,sys:this.#e}),m=this.#D()?".":l.name||this.#e.basename(p);for(let f of d)m!=="."?c.push(this.#e.join(m,f)):c.push(f)}return lm({files:c,policy:o,filterPattern:i,getDotFiles:r})}async collectRepoMetrics(e={}){let{collectRepoMetrics:r}=await Promise.resolve().then(()=>(jq(),$q)),n=this.#a;return e.rootPath&&(n=this.#e.join(this.#a,e.rootPath)),r(this.#e,n)}getSessionId(){return this.getSessionContext().sessionId}getSpaceId(){return this.#u.builderPublicKey}async revertToCommitHash(e){this.#b=!1,await this.abortMerge(!1),await this.git(["revert","--no-commit",`${e}..HEAD`]),await this.git(["commit","--allow-empty","--quiet","--no-verify","-m","Revert changes"]);let n=(await this.emitGitStatus())?.currentCommit;if(!n){this.#e.Sentry?.captureException(new Error("Failed to get current commit hash after revert"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"}});return}this.requestRefresh(),await this.#I({lastCommit:n})}async resetToCommitHash(e){if(this.#b=!1,await this.abortMerge(!1),await this.git(["reset","--quiet","--hard",e]),(await this.emitGitStatus())?.currentCommit!==e)throw new Error("Failed to reset commit hash");this.requestRefresh()}async restore({location:e,predicate:r,revert:n=!1,dryRun:i=!1,forceReplay:s=!1,debug:o}){let a=this.getSessionContext(),c=a.turns.length,u=null;for(let f=c-1;f>=-1;f--)if(r(f>=0?a.turns[f]:null,f)){u=f;break}if(u===null)return{undone:null,message:"Could not find the target to restore to, the completion id could be wrong"};n||await this.abort(!0);let l=new Map,p=!!this.#t?.git,d=a.turns,m=Math.max(0,e==="before"?u:u+1);for(let f=d.length-1;f>=m;f--){let g=d[f];for(let y of g.applyResults)l.set(y.filePath,y.oldContent??"")}if(!i){let f;if(p){u===-1?a.beforeCommit?f=a.beforeCommit:d.length>0&&(f=d[0].beforeCommit):u<d.length&&(e==="after"?(f=d[u].afterCommit,!f&&u+1<d.length&&(f=d[u+1].beforeCommit)):f=d[u].beforeCommit);let D={commitHash:f,sessionId:a.sessionId,sessionBeforeCommit:a.beforeCommit,turnsLength:d.length,targetIndex:u,currentTurn:d[d.length-1],targetTurn:d[u],targetTurnNext:d[u+1],location:e,forceReplay:s,dryRun:i,debug:o};if(!f)return this.#e.Sentry?.captureException(new Error("No commit hash found for restore"),{tags:{operation:"codegen-git",endpoint:"revertToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Could not find the target to restore to, the git history is missing"};try{n?await this.revertToCommitHash(f):await this.resetToCommitHash(f)}catch(E){return this.#e.Sentry?.captureException(new Error("Error resetting git",{cause:E}),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},contexts:{restore:D}}),{undone:null,message:"Failed to reset/restore, the file history is missing"}}}else for(let[D,E]of l.entries())try{E?await this.writeFile(D,E):await this.deleteFile(D)}catch{}if(n)return{undone:[],message:"The revert operation was successful"};let g=d.splice(m,d.length-m),y=ia(d);y&&y?.afterCommit!==f&&(this.#e.Sentry?.captureException(new Error("Reset After commit hash mismatch"),{tags:{operation:"codegen-git",endpoint:"resetToCommitHash"},extra:{lastTurn:y,commitHash:f}}),y.lastCommit=f,await this.#I({completionId:y.completionId,lastCommit:f}));let v=y?.completionId;if(g.length>0&&(await Vq(this.#e,this.#u,{lastCompletionId:v,sessionId:a.sessionId},!!this.#o),a.updatedUnixTime=Date.now()),s){let D=a.state;this.#r.emit("step",{type:"batch",steps:[{type:"state",newState:"replay",abortable:!1,previousState:D},...this.#de(),{type:"restore",files:Array.from(l.keys()),lastCompletionId:v,location:e},{type:"state",newState:D,abortable:!1,previousState:"replay"}]})}else g.length>0&&this.#r.emit("step",{type:"restore",files:Array.from(l.keys()),lastCompletionId:v,location:e})}return await this.#Te(),{undone:Array.from(l.keys()),message:"The restore operation was successful"}}async#Te(e){return await this.#t?.devServerOrchestrator?.ensureDevCommand(e)}async restoreFromCompletionId({location:e,completionId:r,forceReplay:n}){let i=this.getSessionContext();return i.turns.find(o=>o.completionId===r)?this.restore({location:e,predicate:o=>o?.completionId===r,forceReplay:n,debug:`restore to: ${r}`}):(await this.#M,i.turns=[],i.canLoadMore=!0,await Vq(this.#e,this.#u,{sessionId:i.sessionId,lastCompletionId:r},!!this.#o),await this.loadMoreTurns(),this.restore({location:e,predicate:()=>!0,forceReplay:!0,debug:"restore after history"}))}async restoreBeforeCompletionId(e){return this.restoreFromCompletionId({location:"before",completionId:e,forceReplay:!1})}async undoLastUserMessage(e=!1){return this.restore({location:"before",predicate:r=>r?.user.role==="user",dryRun:e})}getLastUserCompletionId(){let e=this.getSessionContext();return IEe(e)?.completionId}getLastCompletionId(){let e=this.getSessionContext();return qq(e)?.completionId}getCurrentState(){return this.getSessionContext().state}getLastApplyResultsTurn(){let e=this.getSessionContext();return NEe(e)}getLastTurn(){let e=this.getSessionContext();return qq(e)}getNextUrl(){return this.getLastTurn()?.nextUrl}getScheduledMessage(){let e=this.#c;if(e)return this.#c=void 0,this.#f=e,e}getNextMessage(){let e=new Promise(r=>{this.#c?r():this.#E=r}).then(()=>{let r=this.#c;if(r)return!r.dropAbortedPrompt&&this.#f&&(r=Hq(this.#f,r)),this.#c=void 0,this.#f=r,r});return{shouldWait:!this.#c,promise:e}}async sendFeedback(e){if(process.env.NODE_ENV==="test")return;st("quality code feedback given",{spaceId:this.#u.builderPublicKey,sentiment:e.feedbackSentiment,mode:"cli"});let r=e.id??this.getLastCompletionId();r&&await this.#Pe({...e,id:r})}#I(e){let r=e.completionId;if(!r){let i=this.getLastTurn();i&&e.lastCommit&&(i.lastCommit=e.lastCommit),r=i?.completionId}let n=Gq(this.#e,this.#u,"/codegen/finalize",{completionId:r,projectId:this.#n?.projectId,branchName:this.#n?.branchName,userCompletionId:this.getLastUserCompletionId(),sessionId:this.getSessionId(),...e});return this.#h.push(n),n.finally(()=>{let i=this.#h.indexOf(n);i!==-1&&this.#h.splice(i,1)}),n}#Pe(e){let r=Gq(this.#e,this.#u,"/codegen/feedback",e);return this.#h.push(r),r.finally(()=>{let n=this.#h.indexOf(r);n!==-1&&this.#h.splice(n,1)}),r}async lastTurnHasChanges(){let e=await this.undoLastUserMessage(!0);return e.undone?e.undone.length>0:!1}#x(e){let r=this.getSessionContext(),n=r.state;n!==e&&(r.state=e,this.#r.emit("step",{type:"state",abortable:e==="generating",previousState:n,newState:e}))}waitUntilState(e,r=1e4){return new Promise(n=>{if(this.getSessionContext().state===e){n();return}let s,o=a=>{a.type==="state"&&a.newState===e&&(clearTimeout(s),this.#r.removeListener("step",o),n())};s=setTimeout(()=>{this.#r.removeListener("step",o),n()},r),this.#r.on("step",o)})}async clearSession(){let e=this.getSessionContext();e.turns=[],e.customInstructions=await this.#J(),this.#K=!0,this.#b=!1}async sendMessage(e){!e.dropAbortedPrompt&&this.#c&&(e=Hq(this.#c,e)),this.#c=e,this.#b=!1,e.queue||await this.abort(),this.#E&&this.#E()}getTurns(){let e=this.getSessionContext();return structuredClone(e.turns)}getSessionContext(){if(!this.#l)throw new Error("Session context not initialized");return this.#l}async runSetupCommand(){return await this.#t?.devServerOrchestrator?.runSetupCommand()}abortSetupCommand(){this.#t?.devServerOrchestrator?.abortSetupCommand()}toolsRunning(){return this.#y.length>0}abortAllTools(){for(let e of this.#y)e.abortController.abort()}toolFullfilment(e,r){return typeof r=="string"&&(r={toolResult:r,isError:!1}),this.fulfillToolCall(e,r)}fulfillToolCall(e,r){let n=this.#G.get(e);return n?(n(r),this.#G.delete(e),!0):!1}abortToolCall(e){let r=this.#y.find(n=>n.id===e);if(r)return r.abortController.abort(),!0;if(this.#y.length===0){let n=new AbortController;return n.abort(),this.#y.push({id:e,abortController:n,input:{id:e},name:"bash"}),!0}return!1}async acceptCode(){if(this.#fe()){let e=this.getLinesStats();await this.sendFeedback({position:this.#U,acceptedLines:e.net,linesOfCodeAdded:e.added,linesOfCodeRemoved:e.removed})}}async abort(e=!1){return e&&(this.#f=void 0,this.#c=void 0),this.#F=0,this.#g?(this.#g.abort(),this.#g=void 0,!0):!1}async stopEventLoop(){await this.abort(!0),this.#T?.abort(),this.#T=void 0,this.#E&&this.#E()}requestRefresh(){this.#r.emit("step",{type:"builder-action",action:"refresh",metadata:{}})}async configureDevOrchestrator(e){let r=this.#t?.devServerOrchestrator,n={devCommand:!1,hosts:!1,setupCommand:!1,proxyServer:!1,env:!1,setupResult:void 0,devResult:void 0};if(r){let i=[];e.env&&(this.#K=!0,e.replaceEnvs&&r.clearEnvVariables(),Object.entries(e.env).forEach(([s,o])=>{r.setEnvVariable(s,o??void 0)&&(n.env=!0)})),e.proxyServer?i.push(r?.setProxyServer(e.proxyServer).then(s=>{n.proxyServer=s.updatedProxyServer,n.hosts=s.updatedHosts})):e.proxyPort&&i.push(r?.setPort(e.proxyPort).then(s=>n.proxyServer=s)),e.setupCommand!==void 0||e.setupDependencies!==void 0?i.push(r.setSetupCommand({setupDependencies:e.setupDependencies,setupCommand:e.setupCommand,forceRestart:e.forceSetupCommand}).then(s=>{n.setupCommand=!!s,n.setupResult=s??void 0})):(e.forceSetupCommand||n.env&&r.setupState!=="installed")&&i.push(r?.runSetupCommand().then(s=>{n.setupCommand=!!s,n.setupResult=s??void 0})),e.devCommand!==void 0?i.push(r.setDevCommand(e.devCommand??void 0,e.forceDevCommand).then(s=>{n.devCommand=s.status==="success",n.devResult=s??void 0})):(e.forceDevCommand||n.env)&&i.push(r?.restart().then(s=>{n.devCommand=!0,n.devResult=s??void 0})),e.autoDetectDevServer!==void 0&&i.push(r.setAutoDetectSettings(e.autoDetectDevServer,e.autoDetectDevServerPatterns).then(s=>n.proxyServer=n.proxyServer||s)),await Promise.allSettled(i)}return n}#Ae(){for(let e of Array.from(this.#p.keys()))try{this.disposeTerminal({terminalId:e})}catch{}this.#p.clear()}async close(e=!1){if(this.#W)return;if(this.#W=!0,this.#ie.forEach(n=>n()),this.#Ae(),this.#A)try{this.#o&&console.log("\u{1F50C} Cleaning up local MCP servers..."),await this.#A.cleanup()}catch(n){this.#e.Sentry?.captureException(n,{level:"warning",tags:{operation:"local-mcp-cleanup"}})}await this.stopEventLoop(),await this.waitUntilState("close",5e3),this.#r.removeAllListeners(),await Promise.allSettled(this.#h);let r=await this.needsBackup();this.#o&&console.log(`\u{1F50D} Closing code gen server: ${JSON.stringify({uploadGitBackup:e,needsBackup:r})}`),e&&r&&await this.uploadBackup()}async emitGitStatus(){let e=await this.#_e();return e&&(this.#z=e,this.#r.emit("step",e),e.hasMergeConflict?this.#w():this.#z.hasMergeConflict&&this.#w()),e}async manualCommit(e){let r=this.getSessionContext();if(!r.beforeCommit){let i=await this.getCurrentCommitHash();i&&(r.beforeCommit=i)}await this.git(["add",e.add]),await this.git(["commit","--quiet","--no-verify","-m",e.commitMessage]);let n=await this.getCurrentCommitHash();await this.#I({lastCommit:n}),await this.emitGitStatus()}async#w(){let e=this.getSessionContext();if(e.state==="generating"||e.state==="close")return this.#B=void 0,!1;let r=await this.#ve(e);return this.#B=r,this.#r.emit("step",{type:"wait-for-input",state:e.state,suggestion:r,sessionMode:e.sessionMode,hasPlanToApply:this.#b}),!0}async#_e(){if(!this.#t?.git)return null;this.#V++;let e=this.#fe(),r=this.getCommitMode(),n=this.#Y(),i=!1,s="",o=null;try{let d=await this.git(["rev-parse","--absolute-git-dir"]);o=this.#e.join(d,"FETCH_HEAD"),_m.default.existsSync(o)&&_m.default.unlinkSync(o)}catch(d){this.#e.Sentry?.captureException(d,{tags:{operation:"codegen-git",endpoint:"getGitStatus"},extra:{fetchHeadFilePath:o,isCheckingGitStatus:this.#V}}),o=null}try{s=await this.git(["fetch","--no-tags","origin",n]),i=!0}catch{i=!1}let a=await this.#e.getRepoInfo(this.#a),c=this.getSessionContext().beforeCommit,u=e?1:0,l=0;if(i)try{let d=zEe(await this.git(["rev-list","--left-right","--count","HEAD...FETCH_HEAD"]));u=d.ahead,l=d.behind}catch(d){let m=null;if(o)try{m=await this.#e.readFile(this.#e.join(this.#a,".git/FETCH_HEAD")),m=`FETCH_HEAD: ${m}`}catch(f){m=`FETCH_HEAD FAILED: ${String(f)}`}else m="FETCH_HEAD MISSING";this.#e.Sentry?.captureException(d,{tags:{operation:"codegen-git",endpoint:"getGitStatus"},extra:{fetchOutput:s,fetchHead:m,remoteBranch:n,currentBranch:a.currentBranch,currentCommit:a.commit,isCheckingGitStatus:this.#V}})}else!i&&r!=="commits"&&c&&c!==a.commit&&(u=Math.max(u,1));let p=await this.#k();return this.#V--,{type:"git",remoteBranchExists:i,hasGeneratingPlaceholder:await this.#Be(),isSessionDirty:e||!!c&&c!==a.commit,canSync:(u>0||l>0)&&!p,canPush:(u>0||l>0)&&!p,canPull:l>0&&i,ahead:u,hasMergeConflict:p,commitMode:r,behind:l,currentCommit:a.commit,currentBranch:a.currentBranch,remoteBranch:n}}#de(){let e=this.getSessionContext(),r=e.turns,n=[];n.push({type:"session",title:e.title,beforeCommit:e.beforeCommit,createdUnixTime:e.createdUnixTime,updatedUnixTime:e.updatedUnixTime,turns:e.turns.length,id:e.sessionId,lastCompletionId:this.getLastCompletionId(),sessionMode:e.sessionMode});for(let i of r){n.push({type:"user",displayPrompt:i.userMessage?i.userMessage.displayPrompt??i.userMessage.userPrompt:void 0,attachments:i.userMessage?.attachments,id:i.completionId,user:i.user,role:i.user.role,compacting:!1});for(let s of i.actions)(s.type==="tool"||s.type==="text"||s.type==="thinking")&&(n.push({type:"start",name:s.type,content:"",id:s.id??"",filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??s.filePath??""}),n.push({type:"delta",name:s.type,delta:s.content}),s.type==="tool"?n.push({type:s.type,id:s.id,name:s.filePath,content:s.content}):s.type==="thinking"?n.push({type:"planning",content:s.content}):s.type==="text"&&n.push({type:"text",content:s.content}))}return n}connectToEventLoop(e,r){if(e){let n=[],i=this.getSessionContext();n.push({type:"state",newState:"replay",abortable:!1,previousState:i.state}),this.#Q&&n.push(this.#Q),this.#z&&n.push(this.#z),n.push(...this.#de());let s=this.#L?ia(this.#L):void 0;if(s)switch(s.type){case"file":case"diff":case"text":case"thinking":case"suggestion":case"tool":n.push({type:"start",id:s.id,name:s.type,filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??"",content:""}),n.push({type:"delta",name:s.type,delta:s.content});break}n.push({type:"terminals",terminals:this.#re()});let o=this.#t?.devServerOrchestrator;o?(n.push({type:"dev-server",devServerState:o.devState,setupState:o.setupState,httpServerState:o.httpServerState,devCommand:o.devCommand,setupCommand:o.setupCommand,proxyServer:o.proxyTarget}),o.setupState!=="installed"&&n.push({type:"stdio",id:"setupCommand",command:o.setupCommand??"",content:o.getSetupWrite(),source:"run-command",stream:"stdout"}),n.push({type:"stdio",id:"devServer",command:o.devCommand,content:o.getDevWrite(),source:"run-command",stream:"stdout"})):r({type:"dev-server",devServerState:"running",setupState:"installed",httpServerState:"ok-2xx",devCommand:this.#n?.devCommand,setupCommand:this.#n?.setupCommand,proxyServer:this.#n?.serverUrl}),n.push({type:"state",newState:i.state,abortable:i.state==="generating",previousState:"replay"}),this.#P&&i.state!=="generating"&&n.push({type:"wait-for-input",state:i.state,suggestion:this.#B,sessionMode:i.sessionMode,hasPlanToApply:this.#b}),r({type:"batch",steps:n})}return this.#r.on("step",r),this.waitForEventLoop(),()=>{this.#r.off("step",r)}}waitUntilIdle(){return this.waitForEventLoop(),(0,Rb.once)(this.#r,"idle").then(()=>Promise.allSettled(this.#h)).then(()=>{})}waitForEventLoop(){return this.#P?this.#P:this.#P=this.#Fe()}async#Fe(){if(this.#P||this.#T)throw new Error("Event loop already started");let e=qEe(),r=a=>{a.type==="error"&&this.#F>0&&(Uq.includes(a.code)||(a.restoreCredits=this.#F,this.#F=0,OEe(this.#e,this.#u,s.sessionId,a.restoreCredits).catch(c=>{this.#e.Sentry?.captureException(c)}))),this.#r.emit("step",a)};this.#T=new AbortController;let n=this.#T.signal,i=this.#t?.devServerOrchestrator,s=this.getSessionContext(),o=()=>this.getLastCompletionId();this.#e.Sentry?.setContext("codeGen",{sessionId:s.sessionId,get completionId(){return o()}}),await this.emitGitStatus(),i?.setupState==="not-installed"&&this.runSetupCommand();try{for(;!n.aborted;){this.#g=void 0;let a=this.getNextMessage();a.shouldWait&&await this.#w()&&this.#r.emit("idle");let c=await a.promise;if(n.aborted)break;if(c){try{this.#B=void 0,c.logsCheckpoint&&i?.addCheckpoint(),this.#g=new AbortController;let u=cu([n,this.#g.signal]);if(u?.aborted)throw zv();this.#x("generating"),c.sessionMode&&c.sessionMode!==s.sessionMode&&this.switchSessionMode(c.sessionMode),await this.#ke(c,u,r),this.#x("success"),(c.autoPush??"none")!=="none"&&await this.pushChanges({actor:"agent",pullFirst:c.autoPush==="merge-push",forcePush:c.autoPush==="force-push"}),this.#B=void 0}catch(u){u instanceof Error?u.name==="AbortError"?(r({type:"user-abort",hasContinueMessage:!!this.#c}),this.#x("abort")):u instanceof At?(this.#f=void 0,r({type:"error",code:"unknown",message:"An internal error occurred. Please try again."}),this.#e.Sentry?.captureException(u,{tags:{operation:"codegen-stream"}}),this.#x("error")):u instanceof As?(this.#f=void 0,r({type:"error",code:u.code,message:u.message}),Uq.includes(u.code)||this.#e.Sentry?.captureException(u,{tags:{operation:"codegen-stream"}}),this.#x("error")):(this.#f=void 0,r({type:"error",code:"cli-genetic-error",message:u.message,metadata:{error:u}}),this.#e.Sentry?.captureException(u,{tags:{operation:"codegen-stream"}}),this.#x("error")):this.#x("error")}this.#me++}}}catch(a){throw this.#e.Sentry?.captureException(a,{level:"fatal"}),a}finally{this.#T=void 0,this.#P=void 0,e()}this.#r.emit("idle"),this.#x("close")}async#ke(e,r,n){this.#F=0;let i=this.getSessionContext(),s=e.maxCompletions??uP,o=0,a=0,c=0,u=!0,l=!1,p;for(;;){if(r?.aborted)throw zv();try{if(p||(p=await this.#Re(e,u,r,n),p.modelOverride=e.modelOverride),u=!1,p.user.role==="user"){let d=p.files.filter(m=>(m.importance??0)>2.5&&m.content).map(m=>({filePath:m.filePath,size:m.content?.length??0,isCustomInstruction:!1,wasIncluded:m.wasIncluded}));i.customInstructions.forEach(m=>{m.filePath&&d.push({filePath:m.filePath,size:m.content?.length??0,isCustomInstruction:!0,wasIncluded:!0})}),n({type:"user-input",prompt:p.userMessage?.displayPrompt??p.userPrompt,files:d})}try{let{shouldContinue:d,completions:m,filesChanged:f}=await this.#Ie(i,p,r,n);p=void 0,a=0,o++,l||=f,c+=m,this.#f=void 0;let g=await this.emitGitStatus();if(g){let y=this.getAiBranch();if(g.currentBranch!==y){if(c-1>=s){n({type:"error",code:"ask-to-continue",message:"The agent has been working for a while. Do you want to continue?"});break}u=!0,e={userPrompt:`Seems like the current git branch is ${g.currentBranch}, however, this is a broken state in Fusion. Make sure to git checkout into "${y}", before finishing.`,displayPrompt:""};continue}}if(!d)break;if(!r.aborted){let y=this.getScheduledMessage();if(y){u=!0,e=y,c=0;continue}}if(c>=s){n({type:"error",code:"ask-to-continue",message:"The agent has been working for a while. Do you want to continue?"});break}}catch(d){throw await this.emitGitStatus(),d}}catch(d){if(a<2&&(d instanceof As&&d.code==="abrupt-end"||d instanceof Error&&d.name==="HTTPStreamBroke"||d instanceof Error&&d.name==="HTTPStreamHang")){a++;continue}throw d}finally{REe(i.turns);let d=this.#n?.refreshPreview??!0;l&&d&&this.requestRefresh()}}}async#Ie(e,r,n,i){if(this.#L)throw new Error("generateCompletion already started");let s=this.getLastTurn()?.nextUrl??this.#X,o=!1,a=0;i({type:"start",id:"",name:"thinking",title:"Thinking",content:""});try{let c=this.#L=[],u=await this.getCurrentCommitHash();!e.beforeCommit&&u&&(e.beforeCommit=u);let l=this.#oe;l&&this.#d?.encrypt&&(l=!!this.#d.mcpServers);let p=r.userMessage?.uiContextPrompt;if(p&&!this.#D()){let v=this.#n?.workspace?.folders.find(D=>D.enableGit);v?.path&&(p=`Relative file paths are relative to: ${v.path}/`)}let d={url:s,position:this.#U,eventName:"cli code",maxPages:2,autoContinue:1,codeGenMode:this.#q,userContext:{...e.userContext,fullstoryUrl:r.userMessage?.metadata?.fullstoryUrl},files:r.files,maxTokens:this.#se,aclPolicy:this.#n?.accessControl,repoIndexingConfig:this.#n?.repoIndexingConfig,recommendedRoot:this.#n?.workspace?.folders.find(v=>v.enableGit)?.recommendedRoot,attachments:r.attachments,customInstructions:e.customInstructions,sessionId:e.sessionId,userPrompt:r.userPrompt,ephemeralUserPrompt:r.userMessage?.ephemeralUserPrompt,uiContextPrompt:r.userMessage?.uiContextPrompt,displayUserPrompt:r.userMessage?.displayPrompt,isManualContinue:r.userMessage?.isManualContinue,sessionMode:r.userMessage?.sessionMode,projectId:this.#C,branchName:this.#H,pingEvents:!0,workingDirectory:this.#m,beforeCommit:u,toolResults:r.toolResults,role:r.user.role,user:r.user,repair:r.repair,category:r.category,enabledTools:this.#$,enabledMCPs:l?r.enabledMCPs:void 0,localMCPTools:this.#A?.listTools(),searchResponse:r.searchResponse,encryptKey:this.#O,maxAgentTiming:180*1e3,mcpServers:l,environmentVariables:GEe(this.#n?.environmentVariables??[],this.#t?.devServerOrchestrator?.environmentVariables??[]),dirtyEnvironmentVariables:this.#K&&r.user.role==="user",redactUserMessages:this.#d?.redactUserMessages,redactLLMMessages:this.#d?.redactLLMMessages,modelOverride:r.modelOverride??this.#ae,metadata:r.userMessage?.metadata};this.#o&&console.log("Starting completion stream");let m=BEe(this.#e,this.#u,d,n),f,g=!1,y=!1;for await(let v of m){let D=async b=>{if(b.type==="user"){let C=f={state:"running",unixTime:Date.now(),title:"",sentiment:void 0,userMessage:r.userMessage,afterCommit:u,beforeCommit:u,lastCommit:void 0,creditsUsed:0,actions:[],applyResults:[],completionId:b.id??"",nextUrl:void 0,user:b.user,autoContinue:!1};f=C,e.turns.push(C),b.compacting&&(e.customInstructions=await this.#J()),i({type:"user",displayPrompt:b.displayPrompt,id:b.id,user:b.user,role:b.user.role,compacting:b.compacting})}else if(b.type==="mcp-status")this.#Q=b,i(b);else{if(b.type==="mcp-auth-required")return y=!0,i(b),!0;if(b.type==="error")return y=!0,i(b),!0;if(b.type==="done"){a++,this.#F+=b.creditsUsed;let C=f=await this.#Oe(e,b,f,u);for(let _ of b.actions??[])_.type==="tool_result"&&i({type:"tool_result",result:{content:_.content,tool_use_id:_.id,type:"tool_result",title:_.actionTitle,tool_name:_.filePath,is_error:!!_.errors?.length}});C.applyResults.length>0&&this.#t?.devServerOrchestrator?.addCheckpoint();let w=await this.#$e(this.#e,C),F=w.length>0,P=await this.commitWorkInProgress(C,w),A=!1;P?(F=!0,C.afterCommit=P,u=P):P===void 0&&(A=!0),F&&(o=!0),r.user.role==="user"&&(this.#K=!1),this.#I({completionId:C.completionId,beforeCommit:C.beforeCommit,afterCommit:C.afterCommit,commitFailed:A}),i({type:"done",stopReason:b.stopReason,id:b.id,applyResults:C.applyResults,actions:b.actions??[],creditsUsed:b.creditsUsed,sessionUsage:b.sessionUsage,model:b.model,usage:b.usage,url:b.nextUrl,promptVersion:b.promptVersion,hasChanges:F})}else{if(b.type==="continue")return g=b.autoContinue,y=!0,i({type:"continue",id:b.id,url:b.nextUrl,autoContinue:b.autoContinue}),!0;b.type==="thinking"&&(b.actionTitle="Planning"),"content"in b&&b.type!=="delta"&&i({type:"start",name:b.type,filePath:b.filePath??"",id:"id"in b?b.id:void 0,title:b.actionTitle??b.artifactTitle??b.filePath??"",content:b.content??""})}}return!1},E=async b=>{b.type==="thinking"&&i({type:"planning",content:b.content}),b.type==="server_tool_result"&&i({type:"server_tool_result",content:JSON.parse(b.content),title:b.actionTitle??b.artifactTitle??"Server Tool Result",id:b.id}),b.type==="file"&&b.filePath&&!b.synthetic&&i({type:"file",filePath:b.filePath,content:b.content,title:b.actionTitle??b.artifactTitle??"Created",id:b.id,errors:b.errors}),b.type==="diff"&&b.filePath&&!b.synthetic&&i({type:"diff",filePath:b.filePath,title:b.actionTitle??b.artifactTitle??"Updated",content:b.content,id:b.id,errors:b.errors}),b.type==="tool"&&b.filePath?i({type:"tool",name:b.filePath,id:b.id,content:b.content}):b.type==="text"&&i({type:"text",content:b.content})},x=async(b,C)=>{i({type:"delta",name:b.type,delta:C})};if(v.type==="ping"){this.#o&&console.log("generateCompletion: Ping");continue}if(v.type==="delta"){let b=v.content,C=ia(c);C&&"content"in C&&(C.content+=b,await x(C,b))}else{let b=ia(c);if(b&&"content"in b&&(b.incomplete=!1,await E(b)),c.push(v),await D(v))break}}if(!y)throw new As("Completion stream ended abruptly","abrupt-end");return f?{completions:a,filesChanged:o,shouldContinue:g||f.actions.some(v=>v.type==="tool")||f.autoContinue}:{completions:a,shouldContinue:!1,filesChanged:o}}finally{this.#L=void 0}}async commitWorkInProgress(e,r){if(!this.#t?.git)return!1;let n=await this.#k();if(n&&r.length===0||await this.isCleanWorkTree())return!1;try{n?await this.git(["add",...r]):await this.git(["add","."]);let s=`${e.title}
|
|
1953
1953
|
${e.completionId}`.split(`
|
|
1954
|
-
`).flatMap(a=>["-m",a]);return await this.git(["commit","--allow-empty","--quiet","--no-verify",...s]),await this.getCurrentCommitHash()}catch(i){n||this.#e.Sentry?.captureException(new Error("Error commiting work in progress",{cause:i}),{tags:{operation:"codegen-git"}})}}async#Ne(e,r,n,i){let s=r.actions.filter(o=>o.type==="tool"&&o.id).map(o=>{let a=o.content.trim(),c={};try{c=a?JSON.parse(a):{}}catch{c={}}return{id:o.id,name:o.filePath,input:c,abortController:this.#y.find(u=>u.id===o.id)?.abortController??new AbortController}})??[];if(s.length>0){this.#y=s;try{let o={sys:this.#e,credentials:this.#u,files:e.files,user:e.user,position:this.#U,fusionConfig:this.#n,signal:n,canCollapseWorkspace:this.#D(),emitter:this.#r,filterText:c=>(c=
|
|
1954
|
+
`).flatMap(a=>["-m",a]);return await this.git(["commit","--allow-empty","--quiet","--no-verify",...s]),await this.getCurrentCommitHash()}catch(i){n||this.#e.Sentry?.captureException(new Error("Error commiting work in progress",{cause:i}),{tags:{operation:"codegen-git"}})}}async#Ne(e,r,n,i){let s=r.actions.filter(o=>o.type==="tool"&&o.id).map(o=>{let a=o.content.trim(),c={};try{c=a?JSON.parse(a):{}}catch{c={}}return{id:o.id,name:o.filePath,input:c,abortController:this.#y.find(u=>u.id===o.id)?.abortController??new AbortController}})??[];if(s.length>0){this.#y=s;try{let o={sys:this.#e,credentials:this.#u,files:e.files,user:e.user,position:this.#U,fusionConfig:this.#n,signal:n,canCollapseWorkspace:this.#D(),emitter:this.#r,filterText:c=>(c=U8(c,this.#m),this.#n?.accessControl?.secrets&&(c=q8(c,this.#n.accessControl.secrets)),c),allowedCommands:Z$(this.#n?.allowedCommands??[]),getAllFiles:c=>this.getAllFiles({getDotFiles:c.getDotFiles,includePattern:c.pattern,gitignore:!0}),workingDirectory:this.#s,bashWorkingDirectory:this.#m,workspaceFolders:this.#i?.folders??[],restore:c=>this.restore(c),patchFusionConfig:c=>{e.patchFusionConfig||(e.patchFusionConfig={});let u=e.patchFusionConfig.envVariables;Object.assign(e.patchFusionConfig,c),e.patchFusionConfig.envVariables={...u,...c.envVariables}},readFile:c=>this.readFile(c),writeFile:(c,u)=>this.writeFile(c,u),deleteFile:c=>this.deleteFile(c),fileExists:c=>this.fileExists(c),listDir:c=>this.listDir(c),evaluateAccess:(c,u)=>lo(c,u,this.#n?.accessControl,this.#S()),stat:c=>this.stat(c),localMCPManager:this.#A,passThrough:(c,u)=>{let l={toolResult:"Aborted by the user. So the task could not be completed.",isError:!0,title:"Aborted by the user."};return new Promise(p=>{let d=()=>{u.removeEventListener("abort",m),this.#G.delete(c.id)},m=()=>{d(),p(l)};if(u.aborted){m();return}u.addEventListener("abort",m,{once:!0}),this.#G.set(c.id,f=>{d(),p(f)}),this.#r.emit("step",{type:"tool-call-request",id:c.id,name:c.name,input:c.input})})},resolveWorkspacePath:(c,u)=>this.resolveWorkspacePath(c,u),absolutePathToWorkspaceUrl:c=>this.absolutePathToWorkspaceUrl(c),setHasPlanToApply:c=>{this.#b=c},...this.#t},a=await A5(o,s,r.cachedToolResults,i);if(r.cachedToolResults=a,o.signal?.aborted)throw zv();e.patchFusionConfig&&this.#r.emit("step",{type:"fusion-config-patch",patch:e.patchFusionConfig}),e.files=o.files,e.toolResults=a}finally{this.#y=[]}}}async#Re(e,r,n,i){let s=this.getSessionContext(),o=ia(s.turns),a=structuredClone(e.user??o?.user??{source:"agent",role:"agent"}),c={userMessage:void 0,userPrompt:"",files:[],attachments:[],searchResponse:null,rerankFiles:0,mostRelevantFile:null,toolResults:[],user:a,modelOverride:e.modelOverride,repair:e.repair,category:e.category,enabledMCPs:e.enabledMCPs},u=!!this.getLastTurn()?.nextUrl,l=s.turns.length<2||!u;if(r){let d=null;if(l){let D=function(x){return y&&jEe(x)?5:g.has(x)||v.some(b=>x.toLowerCase().startsWith(b.toLowerCase()))?2:0};var p=D;let m=h$(await this.getAllFiles({getDotFiles:!1,gitignore:!0})),f=new Set,g=new Set;if(e.files)for(let x of e.files)f.add(L8(x));let y=e.includeBaseFiles??s.turns.length===0,v=Array.from(f),E=n.aborted?[]:m.map(x=>{let b=D(x);if(b===0)return{filePath:x};let C=null;try{if(C=this.readFileSync(x),!C)return{filePath:x}}catch{return{filePath:x}}let w=C.length<3e4;return{filePath:x,content:C,importance:w?b:2}});c.files=E,c.attachments=e.attachments??[]}if(this.#t?.git){let m,f=await this.getChangesReport();if(f){for(let g of f.files)if(!c.files.some(y=>y.filePath===g))try{let y=await this.readFile(g);c.files.push({filePath:g,importance:0,content:y??void 0})}catch{c.files.push({filePath:g,importance:0})}f.diff.length<3e4?m=f.diff:m=f.files.map(g=>`- ${g}`).join(`
|
|
1955
1955
|
`).trim().slice(0,3e4),m&&(c.userPrompt=`
|
|
1956
1956
|
Since last time, some files were changed by the user or tools (formatting for example):
|
|
1957
1957
|
<modified-files-context>
|
|
@@ -2266,7 +2266,7 @@ See: https://www.builder.io/c/docs/component-mapping-publishing
|
|
|
2266
2266
|
OPEN: ${(0,tc.dim)(d)}`),n=$n(),n.start(`Waiting for ${t.name} authentication`),await Za(d);let m=await i;return n&&n.stop(`Authenticated with ${t.name} successfully`),m}catch(p){throw n&&(n.stop(`Failed to authenticate with ${t.name}.`,-1),Is("auth")),t.sys.Sentry?.captureException(p),c(),p}finally{c()}}var yz,vz,Sn,Tn,tc,bz,xCe,DCe,TP,jb,AP,zt,ECe,an=N(()=>{"use strict";h();yz=require("http");ll();vz=require("node:os"),Sn=require("node:path"),Tn=require("node:fs");$t();tc=J(mr(),1);hp();Ci();bz=require("crypto");Kr();Up();gp();dn();Im();zi();xCe=5294,DCe=5284,TP=4,jb=t=>!!(process.env.CI||t.ci),AP=(t,e)=>{let r=jb(e)?{}:PP(t),n=r.spaceName,i=e.builderUserId??process.env.BUILDER_USER_ID??r.userId,s=e.builderPublicKey??process.env.BUILDER_PUBLIC_KEY??r.builderPublicKey,o=e.builderPrivateKey??process.env.BUILDER_PRIVATE_KEY??r.builderPrivateKey,a=process.env.FIGMA_PERSONAL_TOKEN??e.figmaToken,c;return a?c={access_token:a,oauth:!1}:c=r.figmaAuth,{spaceName:n,userId:i,builderPublicKey:s,builderPrivateKey:o,figmaAuth:c,timestamp:r.timestamp}},zt=async(t,e,r)=>{let{spaceName:n,userId:i,builderPublicKey:s,builderPrivateKey:o,figmaAuth:a,timestamp:c}=AP(t,e);if(r.forceSpaceId&&!e.yes&&s&&s!==r.forceSpaceId)if(R.warning(`You are currently authenticated for space ${(0,tc.yellow)(s)} (${n||"unnamed"}), but this command requires space ${(0,tc.green)(r.forceSpaceId)}.`),await nn({message:"You must switch to the correct space to continue with this code generation command.",options:[{value:"switch",label:"Switch to required space",hint:"Authenticate with the correct space and continue"},{value:"exit",label:"Exit code generation",hint:"Cancel the command and stay in current space"}]})==="switch")s=r.forceSpaceId,o=void 0,n=void 0,i=void 0;else return R.info("Code generation cancelled. You can run the command again when you're ready to switch spaces."),await be(1);if(jb(e)){if(!a&&r.requireFigmaAuth==="if-unset")throw new Error(`No Figma personal token found.
|
|
2267
2267
|
Please set the FIGMA_PERSONAL_TOKEN environment variable.`);if(!o&&r.builderPrivateKey)throw new Error(`No Builder private key found.
|
|
2268
2268
|
Please set the BUILDER_PRIVATE_KEY environment variable.`);if(!s&&r.builderPublicKey)throw new Error(`No Builder public key found.
|
|
2269
|
-
Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,builderPublicKey:s,builderPrivateKey:o,userId:i,spaceName:n}}if((r.requireFigmaAuth==="always"||!a&&r.requireFigmaAuth==="if-unset")&&(a=await CCe(t),Ub(t,{figmaAuth:a})),r.force||!o&&r.builderPrivateKey||!s&&r.builderPublicKey){let{privateKey:u,spaceId:l,spaceName:p,userId:d}=await wCe(t,r.forceSpaceId);if(r.forceSpaceId&&l!==r.forceSpaceId)throw new Error(`OAuth flow returned space ${(0,tc.yellow)(l)}, however the command specified --spaceId=${(0,tc.green)(r.forceSpaceId)}`);s=l,o=u,n=p,i=d,await
|
|
2269
|
+
Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,builderPublicKey:s,builderPrivateKey:o,userId:i,spaceName:n}}if((r.requireFigmaAuth==="always"||!a&&r.requireFigmaAuth==="if-unset")&&(a=await CCe(t),Ub(t,{figmaAuth:a})),r.force||!o&&r.builderPrivateKey||!s&&r.builderPublicKey){let{privateKey:u,spaceId:l,spaceName:p,userId:d}=await wCe(t,r.forceSpaceId);if(r.forceSpaceId&&l!==r.forceSpaceId)throw new Error(`OAuth flow returned space ${(0,tc.yellow)(l)}, however the command specified --spaceId=${(0,tc.green)(r.forceSpaceId)}`);s=l,o=u,n=p,i=d,await N8(i),await gs(t,t.getAppRootDir())&&(await Bm(t,l,void 0,!1)||R.warn("Unable to set public api key in an existing .env file or create a new one. Please ensure you have write access in the current directory.")),Ub(t,{builderPublicKey:s,builderPrivateKey:o,spaceName:n,userId:i,timestamp:new Date().toISOString()})}return i?t.Sentry?.setUser({id:i,username:process.env.USER||process.env.USERNAME||"unknown"}):s&&t.Sentry?.setUser({id:s,username:process.env.USER||process.env.USERNAME||"unknown"}),(n||s)&&t.Sentry?.setContext("builder",{spaceId:s,spaceName:n,userId:i}),{figmaAuth:a,builderPublicKey:s,builderPrivateKey:o,spaceName:n,userId:i,timestamp:c}},ECe="RHr2ed743waC2g2ZHMEJSn6O0NQ08L"});var Tz=S(Gp=>{"use strict";h();Gp.__esModule=!0;Gp.distance=Gp.closest=void 0;var sa=new Uint32Array(65536),PCe=function(t,e){for(var r=t.length,n=e.length,i=1<<r-1,s=-1,o=0,a=r,c=r;c--;)sa[t.charCodeAt(c)]|=1<<c;for(c=0;c<n;c++){var u=sa[e.charCodeAt(c)],l=u|o;u|=(u&s)+s^s,o|=~(u|s),s&=u,o&i&&a++,s&i&&a--,o=o<<1|1,s=s<<1|~(l|o),o&=l}for(c=r;c--;)sa[t.charCodeAt(c)]=0;return a},ACe=function(t,e){for(var r=e.length,n=t.length,i=[],s=[],o=Math.ceil(r/32),a=Math.ceil(n/32),c=0;c<o;c++)s[c]=-1,i[c]=0;for(var u=0;u<a-1;u++){for(var l=0,p=-1,d=u*32,m=Math.min(32,n)+d,f=d;f<m;f++)sa[t.charCodeAt(f)]|=1<<f;for(var c=0;c<r;c++){var g=sa[e.charCodeAt(c)],y=s[c/32|0]>>>c&1,v=i[c/32|0]>>>c&1,D=g|l,E=((g|v)&p)+p^p|g|v,x=l|~(E|p),b=p&E;x>>>31^y&&(s[c/32|0]^=1<<c),b>>>31^v&&(i[c/32|0]^=1<<c),x=x<<1|y,b=b<<1|v,p=b|~(D|x),l=x&D}for(var f=d;f<m;f++)sa[t.charCodeAt(f)]=0}for(var C=0,w=-1,F=u*32,P=Math.min(32,n-F)+F,f=F;f<P;f++)sa[t.charCodeAt(f)]|=1<<f;for(var A=n,c=0;c<r;c++){var g=sa[e.charCodeAt(c)],y=s[c/32|0]>>>c&1,v=i[c/32|0]>>>c&1,D=g|C,E=((g|v)&w)+w^w|g|v,x=C|~(E|w),b=w&E;A+=x>>>n-1&1,A-=b>>>n-1&1,x>>>31^y&&(s[c/32|0]^=1<<c),b>>>31^v&&(i[c/32|0]^=1<<c),x=x<<1|y,b=b<<1|v,w=b|~(D|x),C=x&D}for(var f=F;f<P;f++)sa[t.charCodeAt(f)]=0;return A},Sz=function(t,e){if(t.length<e.length){var r=e;e=t,t=r}return e.length===0?t.length:t.length<=32?PCe(t,e):ACe(t,e)};Gp.distance=Sz;var _Ce=function(t,e){for(var r=1/0,n=0,i=0;i<e.length;i++){var s=Sz(t,e[i]);s<r&&(r=s,n=i)}return e[n]};Gp.closest=_Ce});var bo=S(($nt,$z)=>{h();var owe=require("path").relative;$z.exports=pwe;var awe=process.cwd();function Mz(t,e){for(var r=t.split(/[ ,]+/),n=String(e).toLowerCase(),i=0;i<r.length;i++){var s=r[i];if(s&&(s==="*"||s.toLowerCase()===n))return!0}return!1}function cwe(t,e,r){var n=Object.getOwnPropertyDescriptor(t,e),i=n.value;return n.get=function(){return i},n.writable&&(n.set=function(o){return i=o}),delete n.value,delete n.writable,Object.defineProperty(t,e,n),n}function uwe(t){for(var e="",r=0;r<t;r++)e+=", arg"+r;return e.substr(2)}function lwe(t){var e=this.name+": "+this.namespace;this.message&&(e+=" deprecated "+this.message);for(var r=0;r<t.length;r++)e+=`
|
|
2270
2270
|
at `+t[r].toString();return e}function pwe(t){if(!t)throw new TypeError("argument namespace is required");var e=Vb(),r=Hp(e[1]),n=r[0];function i(s){Gb.call(i,s)}return i._file=n,i._ignored=fwe(t),i._namespace=t,i._traced=mwe(t),i._warned=Object.create(null),i.function=vwe,i.property=bwe,i}function dwe(t,e){var r=typeof t.listenerCount!="function"?t.listeners(e).length:t.listenerCount(e);return r>0}function fwe(t){if(process.noDeprecation)return!0;var e=process.env.NO_DEPRECATION||"";return Mz(e,t)}function mwe(t){if(process.traceDeprecation)return!0;var e=process.env.TRACE_DEPRECATION||"";return Mz(e,t)}function Gb(t,e){var r=dwe(process,"deprecation");if(!(!r&&this._ignored)){var n,i,s,o,a=0,c=!1,u=Vb(),l=this._file;for(e?(o=e,s=Hp(u[1]),s.name=o.name,l=s[0]):(a=2,o=Hp(u[a]),s=o);a<u.length;a++)if(n=Hp(u[a]),i=n[0],i===l)c=!0;else if(i===this._file)l=this._file;else if(c)break;var p=n?o.join(":")+"__"+n.join(":"):void 0;if(!(p!==void 0&&p in this._warned)){this._warned[p]=!0;var d=t;if(d||(d=s===o||!s.name?Bz(o):Bz(s)),r){var m=Lz(this._namespace,d,u.slice(a));process.emit("deprecation",m);return}var f=process.stderr.isTTY?gwe:hwe,g=f.call(this,d,n,u.slice(a));process.stderr.write(g+`
|
|
2271
2271
|
`,"utf8")}}}function Hp(t){var e=t.getFileName()||"<anonymous>",r=t.getLineNumber(),n=t.getColumnNumber();t.isEval()&&(e=t.getEvalOrigin()+", "+e);var i=[e,r,n];return i.callSite=t,i.name=t.getFunctionName(),i}function Bz(t){var e=t.callSite,r=t.name;r||(r="<anonymous@"+IP(t)+">");var n=e.getThis(),i=n&&e.getTypeName();return i==="Object"&&(i=void 0),i==="Function"&&(i=n.name||i),i&&e.getMethodName()?i+"."+r:r}function hwe(t,e,r){var n=new Date().toUTCString(),i=n+" "+this._namespace+" deprecated "+t;if(this._traced){for(var s=0;s<r.length;s++)i+=`
|
|
2272
2272
|
at `+r[s].toString();return i}return e&&(i+=" at "+IP(e)),i}function gwe(t,e,r){var n="\x1B[36;1m"+this._namespace+"\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m"+t+"\x1B[39m";if(this._traced){for(var i=0;i<r.length;i++)n+=`
|
|
@@ -2337,7 +2337,7 @@ Please see the 3.x to 4.x migration guide for details on how to update your app.
|
|
|
2337
2337
|
`)+`\r
|
|
2338
2338
|
\r
|
|
2339
2339
|
`+r)}function Yu(t,e,r,n,i,s){if(t.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,Yu),t.emit("wsClientError",o,r,e)}else Uh(r,n,i,s)}});var pZ=S((Jlt,lZ)=>{h();var TF=class{constructor(e,r,n){this.etaBufferLength=e||100,this.valueBuffer=[n],this.timeBuffer=[r],this.eta="0"}update(e,r,n){this.valueBuffer.push(r),this.timeBuffer.push(e),this.calculate(n-r)}getTime(){return this.eta}calculate(e){let r=this.valueBuffer.length,n=Math.min(this.etaBufferLength,r),i=this.valueBuffer[r-1]-this.valueBuffer[r-n],s=this.timeBuffer[r-1]-this.timeBuffer[r-n],o=i/s;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let a=Math.ceil(e/o/1e3);isNaN(a)?this.eta="NULL":isFinite(a)?a>1e7?this.eta="INF":a<0?this.eta=0:this.eta=a:this.eta="INF"}};lZ.exports=TF});var AF=S((Xlt,dZ)=>{h();var Qu=require("readline"),PF=class{constructor(e){this.stream=e,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(e){this.stream.isTTY&&(e?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(e=null,r=null){this.stream.isTTY&&Qu.cursorTo(this.stream,e,r)}cursorRelative(e=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,Qu.moveCursor(this.stream,e,r))}cursorRelativeReset(){this.stream.isTTY&&(Qu.moveCursor(this.stream,0,-this.dy),Qu.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&Qu.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&Qu.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&Qu.clearScreenDown(this.stream)}newline(){this.stream.write(`
|
|
2340
|
-
`),this.dy++}write(e,r=!1){this.linewrap===!0&&r===!1?this.stream.write(e.substr(0,this.getWidth())):this.stream.write(e)}lineWrapping(e){this.stream.isTTY&&(this.linewrap=e,e?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};dZ.exports=PF});var mZ=S((Zlt,fZ)=>{"use strict";h();fZ.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var gZ=S((tpt,hZ)=>{"use strict";h();var QRe=mZ();hZ.exports=t=>typeof t=="string"?t.replace(QRe(),""):t});var vZ=S((npt,_F)=>{"use strict";h();var yZ=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);_F.exports=yZ;_F.exports.default=yZ});var xZ=S((spt,bZ)=>{"use strict";h();bZ.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var EZ=S((apt,FF)=>{"use strict";h();var ZRe=gZ(),eOe=vZ(),tOe=xZ(),DZ=t=>{if(typeof t!="string"||t.length===0||(t=ZRe(t),t.length===0))return 0;t=t.replace(tOe()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=eOe(n)?2:1)}return e};FF.exports=DZ;FF.exports.default=DZ});var kF=S((upt,CZ)=>{h();CZ.exports=function(e,r,n){if(r.autopadding!==!0)return e;function i(s,o){return(r.autopaddingChar+s).slice(-o)}switch(n){case"percentage":return i(e,3);default:return e}}});var IF=S((ppt,wZ)=>{h();wZ.exports=function(e,r){let n=Math.round(e*r.barsize),i=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,i)}});var NF=S((fpt,SZ)=>{h();SZ.exports=function(e,r,n){function i(o){return n?n*Math.round(o/n):o}function s(o){return(r.autopaddingChar+o).slice(-2)}return e>3600?s(Math.floor(e/3600))+"h"+s(i(e%3600/60))+"m":e>60?s(Math.floor(e/60))+"m"+s(i(e%60))+"s":e>10?s(i(e))+"s":s(e)+"s"}});var RF=S((hpt,TZ)=>{h();var rOe=EZ(),nOe=kF(),iOe=IF(),sOe=NF();TZ.exports=function(e,r,n){let i=e.format,s=e.formatTime||sOe,o=e.formatValue||nOe,a=e.formatBar||iOe,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),p=Object.assign({},n,{bar:a(r.progress,e),percentage:o(c,e,"percentage"),total:o(r.total,e,"total"),value:o(r.value,e,"value"),eta:o(r.eta,e,"eta"),eta_formatted:s(r.eta,e,5),duration:o(l,e,"duration"),duration_formatted:s(l,e,1)});i=i.replace(/\{(\w+)\}/g,function(f,g){return typeof p[g]<"u"?p[g]:f});let d=Math.max(0,r.maxWidth-rOe(i)-2),m=Math.floor(d/2);switch(e.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=m>0?" ".repeat(m)+i:i;break;case"left":default:break}return i}});var d0=S((ypt,PZ)=>{h();function Wt(t,e){return typeof t>"u"||t===null?e:t}PZ.exports={parse:function(e,r){let n={},i=Object.assign({},r,e);return n.throttleTime=1e3/Wt(i.fps,10),n.stream=Wt(i.stream,process.stderr),n.terminal=Wt(i.terminal,null),n.clearOnComplete=Wt(i.clearOnComplete,!1),n.stopOnComplete=Wt(i.stopOnComplete,!1),n.barsize=Wt(i.barsize,40),n.align=Wt(i.align,"left"),n.hideCursor=Wt(i.hideCursor,!1),n.linewrap=Wt(i.linewrap,!1),n.barGlue=Wt(i.barGlue,""),n.barCompleteChar=Wt(i.barCompleteChar,"="),n.barIncompleteChar=Wt(i.barIncompleteChar,"-"),n.format=Wt(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Wt(i.formatTime,null),n.formatValue=Wt(i.formatValue,null),n.formatBar=Wt(i.formatBar,null),n.etaBufferLength=Wt(i.etaBuffer,10),n.etaAsynchronousUpdate=Wt(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Wt(i.progressCalculationRelative,!1),n.synchronousUpdate=Wt(i.synchronousUpdate,!0),n.noTTYOutput=Wt(i.noTTYOutput,!1),n.notTTYSchedule=Wt(i.notTTYSchedule,2e3),n.emptyOnZero=Wt(i.emptyOnZero,!1),n.forceRedraw=Wt(i.forceRedraw,!1),n.autopadding=Wt(i.autopadding,!1),n.gracefulExit=Wt(i.gracefulExit,!1),n},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?Wt(e.autopaddingChar," "):"",e}}});var OF=S((xpt,_Z)=>{h();var AZ=pZ(),oOe=AF(),aOe=RF(),cOe=d0(),uOe=require("events");_Z.exports=class extends uOe{constructor(e){super(),this.options=cOe.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new oOe(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new AZ(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:aOe}render(e=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,r,n){this.value=r||0,this.total=typeof e<"u"&&e>=0?e:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new AZ(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,r={}){typeof e=="number"&&(this.value=e,this.eta.update(Date.now(),e,this.total));let n=(typeof e=="object"?e:r)||{};this.emit("update",this.total,this.value);for(let i in n)this.payload[i]=n[i];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let e=this.value/this.total;return this.options.progressCalculationRelative&&(e=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(e)&&(e=this.options&&this.options.emptyOnZero?0:1),e=Math.min(Math.max(e,0),1),e}increment(e=1,r={}){typeof e=="object"?this.update(this.value+1,e):this.update(this.value+e,r)}getTotal(){return this.total}setTotal(e){typeof e<"u"&&e>=0&&(this.total=e)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var kZ=S((Cpt,FZ)=>{h();var lOe=OF(),pOe=d0();FZ.exports=class extends lOe{constructor(e,r){super(pOe.parse(e,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(e,r){this.timer&&(super.update(e,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(e,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(e,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var NZ=S((Tpt,IZ)=>{h();var dOe=AF(),fOe=OF(),mOe=d0(),hOe=require("events");IZ.exports=class extends hOe{constructor(e,r){super(),this.bars=[],this.options=mOe.parse(e,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new dOe(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(e,r,n,i={}){let s=new fOe(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(s),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,s.start(e,r,n),this.emit("start")),s}remove(e){let r=this.bars.indexOf(e);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(e=>e.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render(),this.bars[e].stop();this.terminal.newline()}this.emit("stop")}log(e){this.loggingBuffer.push(e)}}});var OZ=S((Apt,RZ)=>{h();RZ.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var MZ=S((Fpt,BZ)=>{h();BZ.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var $Z=S((Ipt,LZ)=>{h();LZ.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var UZ=S((Rpt,jZ)=>{h();jZ.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var zZ=S((Bpt,qZ)=>{h();var gOe=OZ(),yOe=MZ(),vOe=$Z(),bOe=UZ();qZ.exports={legacy:gOe,shades_classic:yOe,shades_grey:vOe,rect:bOe}});var HZ=S((Lpt,VZ)=>{h();var GZ=kZ(),xOe=NZ(),DOe=zZ(),EOe=RF(),COe=kF(),wOe=IF(),SOe=NF();VZ.exports={Bar:GZ,SingleBar:GZ,MultiBar:xOe,Presets:DOe,Format:{Formatter:EOe,BarFormat:wOe,ValueFormat:COe,TimeFormat:SOe}}});var QZ=S((Hpt,XZ)=>{h();XZ.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var sBe={};Yh(sBe,{default:()=>iBe});module.exports=Nte(sBe);h();h();try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="1fb796d4-a9d3-45ea-8792-92a0d29fe7d8",t._sentryDebugIdIdentifier="sentry-dbid-1fb796d4-a9d3-45ea-8792-92a0d29fe7d8")}catch{}h();var ote=require("../core/index.cjs"),ate=require("../node/index.cjs"),cte=require("../server/index.cjs"),ute=J(ek(),1);h();h();var qb=require("fs/promises");Od();an();hp();$t();var ur=J(mr(),1),zp=require("node:path");zi();Ci();Kr();kr();Hc();var SCe="https://cdn.builder.io",wz=async(t,e)=>{console.log(""),Tt((0,ur.bgCyan)((0,ur.bold)((0,ur.white)(" figma migrate ")))+" "+(0,ur.dim)(Qe));let{builderPrivateKey:r,builderPublicKey:n}=await zt(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0});await st("figma publish started",{spaceId:n});let i=await Qc(t);if(i.length>0){await st("figma migrate with existing files",{spaceId:n}),R.warning(`${(0,ur.yellow)("This repo already has figma mappings in:")}
|
|
2340
|
+
`),this.dy++}write(e,r=!1){this.linewrap===!0&&r===!1?this.stream.write(e.substr(0,this.getWidth())):this.stream.write(e)}lineWrapping(e){this.stream.isTTY&&(this.linewrap=e,e?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};dZ.exports=PF});var mZ=S((Zlt,fZ)=>{"use strict";h();fZ.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var gZ=S((tpt,hZ)=>{"use strict";h();var QRe=mZ();hZ.exports=t=>typeof t=="string"?t.replace(QRe(),""):t});var vZ=S((npt,_F)=>{"use strict";h();var yZ=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);_F.exports=yZ;_F.exports.default=yZ});var xZ=S((spt,bZ)=>{"use strict";h();bZ.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var EZ=S((apt,FF)=>{"use strict";h();var ZRe=gZ(),eOe=vZ(),tOe=xZ(),DZ=t=>{if(typeof t!="string"||t.length===0||(t=ZRe(t),t.length===0))return 0;t=t.replace(tOe()," ");let e=0;for(let r=0;r<t.length;r++){let n=t.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,e+=eOe(n)?2:1)}return e};FF.exports=DZ;FF.exports.default=DZ});var kF=S((upt,CZ)=>{h();CZ.exports=function(e,r,n){if(r.autopadding!==!0)return e;function i(s,o){return(r.autopaddingChar+s).slice(-o)}switch(n){case"percentage":return i(e,3);default:return e}}});var IF=S((ppt,wZ)=>{h();wZ.exports=function(e,r){let n=Math.round(e*r.barsize),i=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,i)}});var NF=S((fpt,SZ)=>{h();SZ.exports=function(e,r,n){function i(o){return n?n*Math.round(o/n):o}function s(o){return(r.autopaddingChar+o).slice(-2)}return e>3600?s(Math.floor(e/3600))+"h"+s(i(e%3600/60))+"m":e>60?s(Math.floor(e/60))+"m"+s(i(e%60))+"s":e>10?s(i(e))+"s":s(e)+"s"}});var RF=S((hpt,TZ)=>{h();var rOe=EZ(),nOe=kF(),iOe=IF(),sOe=NF();TZ.exports=function(e,r,n){let i=e.format,s=e.formatTime||sOe,o=e.formatValue||nOe,a=e.formatBar||iOe,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),p=Object.assign({},n,{bar:a(r.progress,e),percentage:o(c,e,"percentage"),total:o(r.total,e,"total"),value:o(r.value,e,"value"),eta:o(r.eta,e,"eta"),eta_formatted:s(r.eta,e,5),duration:o(l,e,"duration"),duration_formatted:s(l,e,1)});i=i.replace(/\{(\w+)\}/g,function(f,g){return typeof p[g]<"u"?p[g]:f});let d=Math.max(0,r.maxWidth-rOe(i)-2),m=Math.floor(d/2);switch(e.align){case"right":i=d>0?" ".repeat(d)+i:i;break;case"center":i=m>0?" ".repeat(m)+i:i;break;case"left":default:break}return i}});var d0=S((ypt,PZ)=>{h();function Wt(t,e){return typeof t>"u"||t===null?e:t}PZ.exports={parse:function(e,r){let n={},i=Object.assign({},r,e);return n.throttleTime=1e3/Wt(i.fps,10),n.stream=Wt(i.stream,process.stderr),n.terminal=Wt(i.terminal,null),n.clearOnComplete=Wt(i.clearOnComplete,!1),n.stopOnComplete=Wt(i.stopOnComplete,!1),n.barsize=Wt(i.barsize,40),n.align=Wt(i.align,"left"),n.hideCursor=Wt(i.hideCursor,!1),n.linewrap=Wt(i.linewrap,!1),n.barGlue=Wt(i.barGlue,""),n.barCompleteChar=Wt(i.barCompleteChar,"="),n.barIncompleteChar=Wt(i.barIncompleteChar,"-"),n.format=Wt(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Wt(i.formatTime,null),n.formatValue=Wt(i.formatValue,null),n.formatBar=Wt(i.formatBar,null),n.etaBufferLength=Wt(i.etaBuffer,10),n.etaAsynchronousUpdate=Wt(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Wt(i.progressCalculationRelative,!1),n.synchronousUpdate=Wt(i.synchronousUpdate,!0),n.noTTYOutput=Wt(i.noTTYOutput,!1),n.notTTYSchedule=Wt(i.notTTYSchedule,2e3),n.emptyOnZero=Wt(i.emptyOnZero,!1),n.forceRedraw=Wt(i.forceRedraw,!1),n.autopadding=Wt(i.autopadding,!1),n.gracefulExit=Wt(i.gracefulExit,!1),n},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?Wt(e.autopaddingChar," "):"",e}}});var OF=S((xpt,_Z)=>{h();var AZ=pZ(),oOe=AF(),aOe=RF(),cOe=d0(),uOe=require("events");_Z.exports=class extends uOe{constructor(e){super(),this.options=cOe.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new oOe(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new AZ(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:aOe}render(e=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,r,n){this.value=r||0,this.total=typeof e<"u"&&e>=0?e:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new AZ(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,r={}){typeof e=="number"&&(this.value=e,this.eta.update(Date.now(),e,this.total));let n=(typeof e=="object"?e:r)||{};this.emit("update",this.total,this.value);for(let i in n)this.payload[i]=n[i];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let e=this.value/this.total;return this.options.progressCalculationRelative&&(e=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(e)&&(e=this.options&&this.options.emptyOnZero?0:1),e=Math.min(Math.max(e,0),1),e}increment(e=1,r={}){typeof e=="object"?this.update(this.value+1,e):this.update(this.value+e,r)}getTotal(){return this.total}setTotal(e){typeof e<"u"&&e>=0&&(this.total=e)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var kZ=S((Cpt,FZ)=>{h();var lOe=OF(),pOe=d0();FZ.exports=class extends lOe{constructor(e,r){super(pOe.parse(e,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(e,r){this.timer&&(super.update(e,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(e,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(e,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var NZ=S((Tpt,IZ)=>{h();var dOe=AF(),fOe=OF(),mOe=d0(),hOe=require("events");IZ.exports=class extends hOe{constructor(e,r){super(),this.bars=[],this.options=mOe.parse(e,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new dOe(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(e,r,n,i={}){let s=new fOe(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(s),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,s.start(e,r,n),this.emit("start")),s}remove(e){let r=this.bars.indexOf(e);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(e=>e.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render(),this.bars[e].stop();this.terminal.newline()}this.emit("stop")}log(e){this.loggingBuffer.push(e)}}});var OZ=S((Apt,RZ)=>{h();RZ.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var MZ=S((Fpt,BZ)=>{h();BZ.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var $Z=S((Ipt,LZ)=>{h();LZ.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var UZ=S((Rpt,jZ)=>{h();jZ.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var zZ=S((Bpt,qZ)=>{h();var gOe=OZ(),yOe=MZ(),vOe=$Z(),bOe=UZ();qZ.exports={legacy:gOe,shades_classic:yOe,shades_grey:vOe,rect:bOe}});var HZ=S((Lpt,VZ)=>{h();var GZ=kZ(),xOe=NZ(),DOe=zZ(),EOe=RF(),COe=kF(),wOe=IF(),SOe=NF();VZ.exports={Bar:GZ,SingleBar:GZ,MultiBar:xOe,Presets:DOe,Format:{Formatter:EOe,BarFormat:wOe,ValueFormat:COe,TimeFormat:SOe}}});var QZ=S((Hpt,XZ)=>{h();XZ.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var sBe={};Yh(sBe,{default:()=>iBe});module.exports=Nte(sBe);h();h();try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c9d668d6-bfd1-4959-9187-e8a8951d0012",t._sentryDebugIdIdentifier="sentry-dbid-c9d668d6-bfd1-4959-9187-e8a8951d0012")}catch{}h();var ote=require("../core/index.cjs"),ate=require("../node/index.cjs"),cte=require("../server/index.cjs"),ute=J(ek(),1);h();h();var qb=require("fs/promises");Od();an();hp();$t();var ur=J(mr(),1),zp=require("node:path");zi();Ci();Kr();kr();Hc();var SCe="https://cdn.builder.io",wz=async(t,e)=>{console.log(""),Tt((0,ur.bgCyan)((0,ur.bold)((0,ur.white)(" figma migrate ")))+" "+(0,ur.dim)(Qe));let{builderPrivateKey:r,builderPublicKey:n}=await zt(t,e,{forceSpaceId:e.spaceId,builderPrivateKey:!0,builderPublicKey:!0});await st("figma publish started",{spaceId:n});let i=await Qc(t);if(i.length>0){await st("figma migrate with existing files",{spaceId:n}),R.warning(`${(0,ur.yellow)("This repo already has figma mappings in:")}
|
|
2341
2341
|
|
|
2342
2342
|
${i.map(u=>` - ${(0,zp.relative)(t.getAppRootDir(),u)}`).join(`
|
|
2343
2343
|
`)}
|
|
@@ -2358,8 +2358,8 @@ ${o}
|
|
|
2358
2358
|
${s}`,"typescript",void 0)}function Cz(t){let{importName:e,importPath:r}=t,n="importType"in t?t.importType:t.exportType;if(e&&r){let i=JSON.stringify(r);return n==="named"?`import { ${e} } from ${i};`:`import ${e} from ${i};`}return""}h();lf();var zb=J(require("prompts"),1),Vp=J(require("node:fs"),1);mE();$t();Od();an();var Me=J(mr(),1),Pz=require("node:path");gp();var Mm=J(Tz(),1);zi();In();hp();Ci();Kr();Ei();kr();ru();$b();i1();By();Hc();dt();Up();yp();function FCe(t){try{return new URL(t),!0}catch{return!1}}var Az=async(t,e)=>{let r=await lP(t);t.Sentry?.setContext("userContext",r);let n=!e.componentName||!e.mappingOutput||!e.skipInstallation;if(n&&!process.stdout.isTTY&&process.env.FORCE_TTY!=="1")return await st("tty error",{}),ke(`This command requires a TTY-enabled terminal.
|
|
2359
2359
|
If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await be(1);if(console.log(""),Tt((0,Me.bgMagenta)((0,Me.bold)((0,Me.white)(" figma generate ")))+" "+(0,Me.dim)(Qe)),R.message((0,Me.dim)(`This command will help you create new mapper files to connect Figma components to your code components.
|
|
2360
2360
|
Check out `)+(0,Me.bold)((0,Me.cyan)("https://www.builder.io/c/docs/cli-mapping"))+(0,Me.dim)(" for more details.")),e.componentName&&!e.mappingOutput)return R.error("Mapping output must be provided when mapping a single component"),await be(1);if(typeof e.mappingOutput=="string"&&!Pn(e.mappingOutput))return R.error("Mapping output must end with .mapper.{tsx, ts, jsx, js, mjs}, e.g. my-component.mapper.tsx"),await be(1);await Om(t,n);let i;i=$n(),i.start("Loading type information");let s;try{s=await Sa(t)}catch(v){return t.Sentry?.captureException(v),i.stop("Repo's framework is not supported"),await st("figma generate, framework not supported",{frameworks:t.getFrameworks().map(D=>D.name)}),i.message(`We can not generate mappers automatically, but it's possible to do it manually:
|
|
2361
|
-
https://www.builder.io/c/docs/mapping-functions`),await be(1)}let o=[],a;if(e.token)R.message(),a=await zt(t,e,{}),o=await
|
|
2362
|
-
npx builder.io figma generate "https://..."`),Is(),await be(1);if(a=await zt(t,e,{builderPrivateKey:!0,builderPublicKey:!0,requireFigmaAuth:
|
|
2361
|
+
https://www.builder.io/c/docs/mapping-functions`),await be(1)}let o=[],a;if(e.token)R.message(),a=await zt(t,e,{}),o=await Y8(a,e.token,!!e.verbose);else{i&&(i.stop("Component metadata processed"),i=void 0);let v=e._.slice(2);if(!v.length)return ke(`No Figma URL provided, use:
|
|
2362
|
+
npx builder.io figma generate "https://..."`),Is(),await be(1);if(a=await zt(t,e,{builderPrivateKey:!0,builderPublicKey:!0,requireFigmaAuth:X8(v)?"if-unset":void 0,forceSpaceId:e.spaceId}),!a.builderPrivateKey||!a.builderPublicKey)return ke("Missing builder.io credentials"),await be(1);let D=await xz(a.builderPublicKey,a.builderPrivateKey),E=await _P({privateKey:a.builderPrivateKey,spaceId:a.builderPublicKey});if(!D.features?.includes("component-mapping")&&E.length===0)return ke("Component mapping is an enterprise feature. Please visit "+(0,Me.bold)((0,Me.cyan)("https://www.builder.io/unlock-enterprise"))+" to start your trial."),await be(1);i=$n(),i.start("Gathering Figma component info"),o=await Q8(t,e,a.figmaAuth,{privateKey:a.builderPrivateKey,spaceId:a.builderPublicKey},v)}await st("figma generate started",{spaceId:a.builderPublicKey,mode:e.componentName?"non-interactive":"interactive"});let c=hf(Il),u,l,p=await s.getRegistry({readAllInputTypes:!0});i&&(i.stop("Figma's component metadata loaded"),i=void 0),R.message();let d=await Qc(t),{figmaBuilderLinks:m,figmaLinksToResolve:f}=await tm({sys:t,mappingFiles:d});f.length>0&&a.figmaAuth&&await Oy(t,e,a.figmaAuth,m,f);let g=await ICe(o,m);o=o.filter(([,v])=>g.includes(v.key));let y=[];for(let v=0;v<o.length;v++){let[D,E]=o[v];v>0&&R.info(`Mapped ${v} / ${o.length} components:
|
|
2363
2363
|
|
|
2364
2364
|
${o.map(([,k],O)=>v>O?k.documentName==="-"?(0,Me.dim)(` \u2756 ${k.name}`)+" "+(0,Me.yellow)("(skipped)"):(0,Me.green)(` \u2714 ${k.name} \u2192 <${k.documentName} />`):v===O?(0,Me.underline)(` \u2192 ${k.name}`):(0,Me.dim)(` \u2756 ${k.name}`)).filter(Boolean).join(`
|
|
2365
2365
|
`)}
|
|
@@ -4026,7 +4026,7 @@ ${t.thumbnail_url?await twe(t,n):""}
|
|
|
4026
4026
|
|
|
4027
4027
|
${t.componentData?rwe(t):""}
|
|
4028
4028
|
`;await Un.writeFile(jn.join(n,"README.md"),i,"utf-8")}async function twe(t,e){let r=new URL(t.thumbnail_url),n=`thumbnail${jn.extname(r.pathname)}`,i=jn.join(e,n);return await ZCe(t.thumbnail_url,i),``}function rwe(t){t.componentData.key=t.key;let e=t.componentData.inputs.length>0?`interface Figma${bn(t.name)}Props {
|
|
4029
|
-
${
|
|
4029
|
+
${K8(t.componentData)}
|
|
4030
4030
|
}`:`// This component has no configurable inputs
|
|
4031
4031
|
interface Figma${bn(t.name)}Props {}`,r=`
|
|
4032
4032
|
|
|
@@ -4520,7 +4520,7 @@ ${f} (${g.length})`,hint:""});for(let y of g){let v=y.isSecret?"***":y.value.len
|
|
|
4520
4520
|
|
|
4521
4521
|
Request Body:
|
|
4522
4522
|
${JSON.stringify(v,void 0,2)}`,"Dry Run Configuration"),Fr((0,jr.green)("Dry run complete! \u{1F3AF}"));return}u.start("Creating project on Builder.io");try{let D=await ze(`${tt}/projects?apiKey=${l.builderPublicKey}&userId=${l.userId}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${l.builderPrivateKey}`},body:JSON.stringify(v)});if(u.stop(),!D.ok){let w=await D.text(),F;try{let P=JSON.parse(w);F=P.message||P.error||w}catch{F=w}throw new Error(`Failed to create project: ${F}`)}let E=await D.json();R.success((0,jr.green)("\u2713 Project created successfully")),R.success((0,jr.green)("\u2713 Default branch created"));let b=`${e.app||e.nativeApp?"builder://":e.dev?"http://localhost:1234":"https://builder.io"}/app/projects/${E.project.id}/${g}`;Fr((0,jr.green)("\u{1F389} Project created successfully!")),Ld([`${(0,jr.cyan)(b)}`,"","Next steps:","1. Configure your dev server command in project settings","2. Set up any required secrets","3. Launch your development environment"].join(`
|
|
4523
|
-
`),"Project URL");let C=await yr({message:"Open project in browser?",initialValue:!0});if(!Fe(C)&&C){let w=$n();w.start("Opening browser"),await Za(b),w.stop("Browser opened")}Fr((0,jr.green)("Done! \u{1F680}"))}catch(D){throw u.stop(),D}}async function rBe(t,e){console.log(""),Tt((0,mc.bgMagenta)((0,mc.bold)((0,mc.white)(" dev-tools server ")))+" "+(0,mc.dim)(Qe)),t.debug("builder dev tools cli init");let r=await(0,ote.createDevTools)(t,e.nativeApp);await(0,cte.createDevToolsServer)({...r,getClientId:()=>"builder-dev-tools-cli",closeAppServer:async()=>{},restartAppServer:async()=>{t.debug("restart server")},enableAppWatch:async n=>n,...t})}JQ();async function nBe(){let t=(0,ute.default)(process.argv.slice(2),{string:["figmaToken","privateKey","spaceId","cwd","prompt","mode","token","url","command","c","serverUrl","builderPublicKey","builderPrivateKey","builderUserId","repoFullName","branchName","installCommand","projectId","configJson","configPath","workspace","enabledTools","disabledTools","designSystemPackage","includeDirectories","components"],boolean:["help","ci","force","verbose","fusionInit","debug","dryrun","yes","skipInstallation","skipDetailedGrouping","noAuth","auth","dev","app","noOpen","open","silent","interactive","jsonOutput","local","clearMappings","index","listIndexedRepos","disableMcp","reset","privacyMode","nativeApp"],alias:{p:"port",c:"command",json:"jsonOutput",native:"nativeApp"},default:{interactive:!1,fusionInit:!1}});t.cwd&&process.chdir(t.cwd);let e=await
|
|
4523
|
+
`),"Project URL");let C=await yr({message:"Open project in browser?",initialValue:!0});if(!Fe(C)&&C){let w=$n();w.start("Opening browser"),await Za(b),w.stop("Browser opened")}Fr((0,jr.green)("Done! \u{1F680}"))}catch(D){throw u.stop(),D}}async function rBe(t,e){console.log(""),Tt((0,mc.bgMagenta)((0,mc.bold)((0,mc.white)(" dev-tools server ")))+" "+(0,mc.dim)(Qe)),t.debug("builder dev tools cli init");let r=await(0,ote.createDevTools)(t,e.nativeApp);await(0,cte.createDevToolsServer)({...r,getClientId:()=>"builder-dev-tools-cli",closeAppServer:async()=>{},restartAppServer:async()=>{t.debug("restart server")},enableAppWatch:async n=>n,...t})}JQ();async function nBe(){let t=(0,ute.default)(process.argv.slice(2),{string:["figmaToken","privateKey","spaceId","cwd","prompt","mode","token","url","command","c","serverUrl","builderPublicKey","builderPrivateKey","builderUserId","repoFullName","branchName","installCommand","projectId","configJson","configPath","workspace","enabledTools","disabledTools","designSystemPackage","includeDirectories","components"],boolean:["help","ci","force","verbose","fusionInit","debug","dryrun","yes","skipInstallation","skipDetailedGrouping","noAuth","auth","dev","app","noOpen","open","silent","interactive","jsonOutput","local","clearMappings","index","listIndexedRepos","disableMcp","reset","privacyMode","nativeApp"],alias:{p:"port",c:"command",json:"jsonOutput",native:"nativeApp"},default:{interactive:!1,fusionInit:!1}});t.cwd&&process.chdir(t.cwd);let e=await I8(!!(t.verbose||t.debug));await e.withScope(async r=>{try{let n=await(0,ate.createDevToolsNodeSys)({cwd:process.cwd(),ignoreMissingConfig:!0});n.Sentry?.setTag("cli-command",t._.join(" ")),n.Sentry?.setContext("flags-args",{...t});let{builderPublicKey:i}=await zt(n,t,{});if(n.Sentry?.setTag("spaceId",i),t.help)return Is(t._[t._.length-1]),await be(0);let s=t._[0];if(s==="figma"){let o=t._[1];try{return await Oz(n,o,t),await be(0)}catch(a){return n.Sentry?.captureException(a),a instanceof qt&&(vn(a),ke()),await be(1)}}else if(s==="code"){let o=t._[1];try{t.index&&(t.skipDetailedGrouping=!0,t.skipHeader=!0,await UF(n,t)),await pz(n,o,t)}catch(a){return n.Sentry?.captureException(a),a instanceof qt&&(vn(a),ke()),await be(1)}}else if(s==="index-repo"||s==="repo-index")try{return await UF(n,t),await be(0)}catch(o){return n.Sentry?.captureException(o),o instanceof qt&&(vn(o),ke()),await be(1)}else if(s==="launch"||s==="fusion")try{await uZ({sys:n,args:t})}catch(o){return n.Sentry?.captureException(o),o instanceof qt&&(vn(o),ke()),await be(1)}else if(s==="add"){let o=kP(n.getAppRootDir(),process.argv.slice(2));return await c$(o),await be(0)}else if(s==="sync"){let o=kP(n.getAppRootDir(),process.argv.slice(2)),a=await JS(o);await g$(n,a).then(()=>{R.success("Builder dev tools is running")}).catch(c=>(R.error("Cannot start builder dev tools"),n.Sentry?.captureException(c),be(1)))}else if(s==="auth"){let o=t._[1];try{return await Iee(n,o,t),await be(0)}catch(a){return n.Sentry?.captureException(a),a instanceof qt&&(vn(a),ke()),await be(1)}}else if(s==="connect-repo"||s==="repo-connect")try{return await ste(n,t),await be(0)}catch(o){return n.Sentry?.captureException(o),o instanceof qt&&(vn(o),ke()),await be(1)}else{if(s==="help")return Is(t._[1]),await be(0);if(s==="publish"||s==="migrate"||s==="generate")return ke("Command not found, do you mean `npx builder.io figma "+s+"`?"),await be(1);rBe(n,t).then(()=>{R.success("Builder dev tools is running")}).catch(o=>(R.error("Cannot start builder dev tools"),e.captureException(o),be(1)))}}catch(n){return e.captureException(n),n instanceof qt&&(vn(n),ke("Cannot start builder dev tools due to network error")),await be(1)}})}nBe();var iBe=void 0;
|
|
4524
4524
|
/*! Bundled license information:
|
|
4525
4525
|
|
|
4526
4526
|
is-extglob/index.js:
|